NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I downloaded the Leaflet 0.7.3 of http://leafletjs.com/download.html
I put my own markers like here - http://leafletjs.com/examples/custom-icons.html
I want the markers were visible only in the larger 17 and 18

What do I add a file leaflet.js?

asked 05 May '15, 22:05

Meku13's gravatar image

Meku13
11112
accept rate: 0%

edited 05 May '15, 22:32

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

1

For info, there's a switch2osm page about this that might help:

https://switch2osm.org/using-tiles/getting-started-with-leaflet/

(05 May '15, 22:07) SomeoneElse ♦

This is AJAX I would prefer in JavaScript

(07 May '15, 13:23) Meku13
1

what about searching or asking on the leafletjs googlegroup mailinglist???

https://groups.google.com/forum/#!forum/leaflet-js

(08 May '15, 13:24) stephan75

You can get zoom level by map.getZoom() on zoom-level-change (see map-properties) and only if 17 or 18 you add/show your markers else you give an hint to zoom in

permanent link

answered 08 May '15, 15:38

Harald%20Hartmann's gravatar image

Harald Hartmann
11135
accept rate: 33%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×74
×37
×6

question asked: 05 May '15, 22:05

question was seen: 9,363 times

last updated: 08 May '15, 15:38

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum