feat: add locate options

This commit is contained in:
relikd
2024-06-27 01:51:33 +02:00
parent 880bca3501
commit 539aa0fcf8
2 changed files with 6 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ class Place(models.Model):
# 'tileOptions': {
# attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
# },
# 'locate': {
# 'returnToPrevBounds': True,
# 'showPopup': False,
# },
})
```
@@ -44,6 +48,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}`)
## Usage