diff --git a/index.php b/index.php index 435d9e89..d941b83e 100644 --- a/index.php +++ b/index.php @@ -45,7 +45,7 @@ html_export_var(array( - + diff --git a/package.json b/package.json index 8ce636ff..0c8e6f1a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "leaflet-geosearch": "^2.4.0", "leaflet-polylineoffset": "^1.1.0", "leaflet-textpath": "git+https://github.com/makinacorpus/Leaflet.TextPath.git#leaflet0.8-dev", - "leaflet.locatecontrol": "^0.61.0", + "leaflet.locatecontrol": "git+https://github.com/plepe/leaflet-locatecontrol.git#initialZoomLevel", "leaflet.polylinemeasure": "git+https://github.com/ppete2/Leaflet.PolylineMeasure.git", "md5": "^2.2.1", "measure-ts": "^3.3.2", diff --git a/src/PluginGeoLocate.js b/src/PluginGeoLocate.js index be4aa2a4..33cdb548 100644 --- a/src/PluginGeoLocate.js +++ b/src/PluginGeoLocate.js @@ -2,10 +2,11 @@ register_hook('init', function () { // Geo location L.control.locate({ locateOptions: { - enableHighAccuracy: true, - maxZoom: 17 + enableHighAccuracy: true }, flyTo: true, + keepCurrentZoomLevel: true, + initialZoomLevel: 17, drawCircle: true, circleStyle: { weight: 0,