geoadmin / web-mapviewer

The viewer application for maps and geodata
https://map.geo.admin.ch
Other
57 stars 9 forks source link

PB-811: Fix go to position if geolocation is active at startup - #patch #1004

Closed ltshb closed 2 months ago

ltshb commented 2 months ago

If the geolocation was activated at startup using the goelocation query parameter the application would not re-center to the position. This would break some legacy links that use this parameter like the swisstopo "you are here" T-shirt.

This was also an issue when entering the parameter in the new query format.

We had several issue here, first the legacy parameter was totally ignored because URLSearchParams parsed the geolocation to an empty string which was not supported by our boolean query param.

Another issue was that per default tracking was off unless you explicitely click on the geolocation button.

Test link

cypress[bot] commented 2 months ago

Passing run #2973 ↗︎

0 211 21 0 Flakiness 0

Details:

PB-811: Only change the zoom in geolocation when tracking
Project: web-mapviewer Commit: da8973f62c
Status: Passed Duration: 03:38 💡
Started: Jul 12, 2024 9:33 AM Ended: Jul 12, 2024 9:37 AM

Review all test suite changes for PR #1004 ↗︎