ref: remove default "returnToPrevBounds"

This commit is contained in:
relikd
2024-07-03 00:16:28 +02:00
parent cc8833037f
commit ea5d41a8ad
2 changed files with 2 additions and 7 deletions

View File

@@ -33,7 +33,6 @@ class Place(models.Model):
# attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
# },
# 'locate': {
# 'returnToPrevBounds': True,
# 'showPopup': False,
# },
})
@@ -48,7 +47,7 @@ class Place(models.Model):
| markerZoom | Initial zoom scale (on load) if a marker is set. (default: `18`)
| tileLayer | [TileLayer](https://leafletjs.com/reference.html#tilelayer) urlTemplate (default: `"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"`)
| tileOptions | [TileLayer Options](https://leafletjs.com/reference.html#tilelayer-option) (default: `{}`)
| locate | [Leaflet.Locate Options](https://github.com/domoritz/leaflet-locatecontrol#possible-options) (default: `{returnToPrevBounds: true, showPopup: false}`)
| locate | [Leaflet.Locate Options](https://github.com/domoritz/leaflet-locatecontrol#possible-options) (default: `{showPopup: false}`)
## Usage

View File

@@ -14,11 +14,7 @@ function MapLocationInit(mapId, options = {}) {
zoom: 2,
...(options.map || {})
});
L.control.locate({
returnToPrevBounds: true,
showPopup: false,
...(options.locate || {})
}).addTo(map);
L.control.locate({ showPopup: false, ...(options.locate || {}) }).addTo(map);
function loadPos() {
if (!valField.value) {