gbif / hosted-portals

Support material for establishing the GBIF Hosted Portals
Apache License 2.0
10 stars 6 forks source link

Occurrence Map Zoom to Data-extents and MapSettings #246

Open jloomisVCE opened 1 year ago

jloomisVCE commented 1 year ago

@MortenHofft As I am configuring a test site for MVA using the data-widget, I am wondering if there is a good way to implement zoom-to-data and zoom-to-map-settings features. In Leaflet maps, I have done this with a button or a link. Does this make sense to add somehow?

In a browser with cache, the map nicely retains the user's last zoom. I haven't found an easy way to return to the initial view defined in the mapSettings configuration value, or to the data displayed on the map.

Thanks for considering this.

MortenHofft commented 1 year ago

I'm not sure I understand:

UPDATE: Or do you mean a button to zoom to the points that are displayed for a specific query? E.g. I look at the table, add some filter, then go to the map, but the maps do not show anything in that extent, because it wasn't where i was last time.

jloomisVCE commented 1 year ago

Thanks. Yes, I mean both of those last two: 'zoom to map settings' and 'zoom to displayed points'. Of those two, 'zoom to displayed data' is MUCH more valuable.

PS: on the first one, 2 years ago I got sick of searching for an app to find my lat/lon/zoom on a map, so I added it to our vernal pool atlas. I have noticed that mature mapping applications, like ESRI, have map navigation features for super-users to 'zoom to point', etc. We have some GIS specialists who asked me to add features.