Adjust locatecontrol options

master
Skylar Ittner 5 years ago
parent d298fefb6f
commit 1d0f6c825e

@ -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);

Loading…
Cancel
Save