gbif / hosted-portals

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

New filter based on current map view #268

Open jholetschek opened 1 year ago

jholetschek commented 1 year ago

In the GBIF portal, it's possible to set a filter based on the current map view ("Explore area""). It would be nice to have the same feature in the hosted portal, i.e. to switch from map view to table or gallery view and get the occurrences I just saw on the map.

MortenHofft commented 12 months ago

For this we need to implement a proper geometry filter. Which we currently do not have and surprisingly few have asked for. But it should be added. Once we have that we are better positioned to add a filter by map extend feature.

One challenge with it might be to get it working in all projections. Translating the view extend of a polar projection into a usable filter might be tricky i suspect - with straight lines getting curved and crossing the pole i imagine polygons might reverse order turning into holes.

If you have experience with this, then please share

jholetschek commented 11 months ago

No experience with that so far, I'm afraid!

MortenHofft commented 7 months ago

Now that we have geometry filters adding this comes easier. I've disabled the option for polar projections as it honestly was too difficult. Sorry @ymgan ! If anyone has experience with this, then I'm happy to learn. At this point sticking with mercator and wgs84 was far simpler.

The feature would be more user friendly with the geometries drawn on the map, but at least it is now possible to filter based on the map view.

Screenshot 2024-03-07 at 15 40 58

It is not deployed to production yet

ymgan commented 7 months ago

This is a great feature, thank you @MortenHofft !!! We all know that you did your best 🥇 please don't apologize!!