Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map from search page: Bounds content with selected filters #1341

Open
dtrucs opened this issue Jan 13, 2025 · 3 comments
Open

Map from search page: Bounds content with selected filters #1341

dtrucs opened this issue Jan 13, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@dtrucs
Copy link
Collaborator

dtrucs commented Jan 13, 2025

For the moment, the map's position in the search page is defined by searchMapCenter and searchMapZoom, which is accurate for all content, but may be less so for content filtered by, for example, “districts” or “cities”.

I think it would be interesting to adjust all filtered content when the user comes from a page other than /search.
I wonder if it's still relevant when the user is already in the search page : the flashing map could be annoying. Maybe adding a button to "fit with the content" could be an alternative?

@dtrucs dtrucs added the enhancement New feature or request label Jan 13, 2025
@camillemonchicourt
Copy link
Member

Map could always fit dynamically on content and just use these parameters if no content or to have a default value ?

@raphaeldoisy
Copy link

While testing searching for treks to see the filter according to the map I found some inaccurate results from the user's point of view.
See the video below.
Capture vidéo du 2025-01-13 12-09-02.webm

As we can see "23 - Le Chemin du Roy" is listed as filtered trek but we can't see it on the map.

Anyway, I agree with Camille for your proposal.

@dtrucs
Copy link
Collaborator Author

dtrucs commented Jan 13, 2025

Indeed good point @raphaeldoisy,
It is interesting to know whether it is relevant to display the trek in the selected BBox even if its lineString is not visible. IMO this part of the debate should be moved to the GTA side because GTR, as a dumb application, only displays information from the API: https://geotrek-admin.ecrins-parcnational.fr/api/v2/trek/?language=fr&page_size=10&page=1&in_bbox=6.474895477294922,44.98881111850516,6.514592170715332,44.99758207601124&fields=id,name&portals=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants