I have a simple question that has me stumped: In a Leaflet application, I have an event listener for clicking elements on the map: However, the setView method also triggers a ‘map moved’ event, which I do not want to fire. Using either plain JavaScript or jQuery, can I prevent any other event from firing while inside the click event
Tag: leaflet
Leaflet circleMarkers don´t show up
I am trying to draw hundres of circleMarker in a Leaflet map, I am using flask and foundation.js, the same code work in different app built with bootstrap.js This is my code: At the bottom I tried a fixed marker which appears and fixed circle which doesn´t, could it be a problem with foundation.js? Because in a previous project with
moveend event fired many times when page is load with Leaflet
I need to do some operations when the map is paned or zoomed, so I attached a callback to the event moveend. It works fine, but when the page is load the event is fired three times and I don’t know why. Probably because during its creation the map is moved. To avoid this i tried to wait the load
leaflet map shows up grey
I’m starting leaflet.js with the quickstart but my map shows as grey… is there something I’m missing? script.js: style.css: index.html: Gives me: Answer You need to implement the next section of the Quick Start Guide: you’ve initialized the map, but haven’t added any tile layers to it, hence gray. So read on to the section beginning with Next we’ll add
Using panTo and panBy simultaneously
I would like to create a map with some pins on it (using leaflet). When the user clicks on one of them, the map should move until the pin is at the bottom of the map in the horizontal center. My map is 400 pixels hight, so I’m using this code: It’s working like a charm – only the IE