A geolocation plugin for Leaflet.
http://mwakerman.github.io/Leaflet.geolocate
var map = new L.Map('map', {
geolocateControl: true,
drawGeolocation: true, // draws the geo location marker when location is found
});
map.geolocate(successCallback, failureCallback) // attempt to centre the map on users coordanates and then call the relevant handler
npm install && make
ProTip You may want to install watch
so you can run watch make
without needing to execute make on every change.
This project was modelled heavily on the Leaflet.fullscreen plugin written by John Firebaugh.
The icon design and lifecycle was based on the Google Maps geolocation feature.