I’m wondering if there’s a way that a user can take the mouse and select a rectangle out of a map - like cropping a photo - that would result in a callback with the bounds of the rectangle.
Thanks!
I’m wondering if there’s a way that a user can take the mouse and select a rectangle out of a map - like cropping a photo - that would result in a callback with the bounds of the rectangle.
Thanks!
Looks like I can add edit controls and then capture the geojson callback, as described here:
https://www.dash-leaflet.com/components/controls/edit_control
That gives me bounds, like this:
‘_bounds’ =
[{‘lat’: 41.77131167976407, ‘lng’: -108.72070312500001}, {‘lat’: 43.77109381775651, ‘lng’: -103.53515625}]
Once I have the bounds, I can re-draw the map to only show the data in the rectangle.