WSWCWaterDataExchange / WestDAAT

Managing the code of the Western States Water Data Access and Analysis Tool (WestDAAT)
https://westdaat.westernstateswater.org/
BSD 3-Clause "New" or "Revised" License
5 stars 5 forks source link

Add an ability to "fit" all of the points on the map #277

Closed Rhipeus closed 1 year ago

Rhipeus commented 1 year ago

A new button on the map (similar to the share link button) should be added to fit all of the points on the screen that match the filters. This button would zoom in to focus on the sites if too far out or zoom out if some of the points are outside the bounds of the screen.

This should be applied to both the main page map (where it is more valuable) but also the landing page maps in case a user moves the map away and needs to easily see the points again.

Rhipeus commented 1 year ago

While this wouldn't fix #208, it could help with some scenarios.

amabdallah commented 1 year ago

Nathan wrote.

The new fit map functionality works pretty well unless there is a very large number of points to fit. If there are too many (like the entire map or entire colorado river basin) the database times out. I'm debating how to fix that.