Top "Leaflet" questions

Leaflet is an open-source JavaScript library for mobile-friendly, cross-browser, interactive maps.

Leaflet - How to find existing markers, and delete markers?

I have started using leaflet as an open source map, http://leaflet.cloudmade.com/ The following jQuery code will enable …

jquery leaflet
How to change the map center in Leaflet.js

The following code initializes a leaflet map. The initialize function centers the map based on user location. How do I …

javascript leaflet
How to reference static assets within vue javascript

I'm looking for the right url to reference static assets, like images within Vue javascript. For example, I'm creating a …

javascript vue.js leaflet
Leaflet changing Marker color

Is there a way to randomly change marker-colors in native Leaflet? I'm using svg elements which could be styled. I …

leaflet
Marker in leaflet, click event

var map = L.map('map'); var marker = L.marker([10.496093,-66.881935]).on('click', onClick); function onClick(e) {alert(e.latlng);} marker.…

javascript leaflet
refresh leaflet map: map container is already initialized

I have a page where given a select to the user he can switch the leaflet map I show. After …

javascript leaflet
Zoom to fit all markers in Mapbox or Leaflet

How do I set view to see all markers on map in Mapbox or Leaflet? Like Google Maps API does …

leaflet mapbox
How to clear leaflet map of all markers and layers before adding new ones?

I have the fallowing code: map: function (events) { var arrayOfLatLngs = []; var _this = this; // setup a marker group var markers = L.…

javascript google-maps maps leaflet
Leaflet Map API with Google Satellite Layer

I'm very interested in the Leaflet Map API. However, I need to be able to use the Google Satellite Layer. …

google-maps-api-3 satellite leaflet
update marker location with leaflet API

I want to build web app with the Leaflet API. First my user is geolocated with IP then if he …

javascript leaflet