Use leaflet.locatecontrol plugin to have a "show my position" button below zoom buttons

This commit is contained in:
Gautier Pelloux-Prayer 2016-07-21 18:50:52 +02:00
parent 66abb83c60
commit a74894824a
5 changed files with 17 additions and 10 deletions

View file

@ -140,6 +140,11 @@
// left sidebar as additional control position
map._controlCorners[leftPaneId] = L.DomUtil.create('div', 'leaflet-' + leftPaneId, map._controlContainer);
L.control.locate({
icon: 'glyphicon glyphicon-screenshot',
iconLoading: 'glyphicon glyphicon-refresh',
}).addTo(map);
document.getElementById('about_link').onclick = function() {
bootbox.alert({
title: 'About',