django-leaflet
django-leaflet copied to clipboard
Dynamic spatial_extent
My first time with a GIS project so this might be stupid. However, in my project, my maps have to have have different bounding boxes depending on the actual features I'm plotting (e.g. if I draw a point in New Delhi, the spatial_extent should be around Delhi). Setting SPATIAL_EXTENT statically up front seems to be very inflexible to do this.
Is there a more dynamic way of handling this? If not, shouldn't it be added?
https://django-leaflet.readthedocs.io/en/latest/advanced.html#config-overrides
Or you can write javascript to have leaflet fit to the bounds of your layer. Check out their documentation.