|
|
@ -26,12 +26,11 @@ function leafletMap() {
|
|
|
|
map.locateControl = L.control.locate({
|
|
|
|
map.locateControl = L.control.locate({
|
|
|
|
flyTo: false, // Hopefully this will lower the number of map tile requests when location is found
|
|
|
|
flyTo: false, // Hopefully this will lower the number of map tile requests when location is found
|
|
|
|
showPopup: false,
|
|
|
|
showPopup: false,
|
|
|
|
keepCurrentZoomLevel: true, // Stop it from snapping back to max zoom
|
|
|
|
|
|
|
|
locateOptions: {
|
|
|
|
locateOptions: {
|
|
|
|
enableHighAccuracy: true,
|
|
|
|
enableHighAccuracy: true,
|
|
|
|
maxZoom: 18
|
|
|
|
maxZoom: 16
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setView: "untilPan",
|
|
|
|
setView: "untilPanOrZoom",
|
|
|
|
icon: "far fa-compass",
|
|
|
|
icon: "far fa-compass",
|
|
|
|
iconLoading: "far fa-compass fa-spin"
|
|
|
|
iconLoading: "far fa-compass fa-spin"
|
|
|
|
}).addTo(map);
|
|
|
|
}).addTo(map);
|
|
|
|