locate control: don't snap back to zoom

This commit is contained in:
Skylar Ittner 2019-09-11 20:47:32 -06:00
parent 0447233d33
commit 8e3f553797

View File

@ -36,6 +36,7 @@ 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: 18