django-leaflet icon indicating copy to clipboard operation
django-leaflet copied to clipboard

Dynamic spatial_extent

Open nibrahim opened this issue 8 years ago • 1 comments

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?

nibrahim avatar Jan 30 '17 08:01 nibrahim

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.

easherma avatar May 05 '17 17:05 easherma