geoadmin / web-mapviewer

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

PB-804 : don't center on search query when sharing position - #minor #1017

Closed ltkum closed 1 month ago

ltkum commented 2 months ago

Issue : When sharing a position, if there was a search query set, the search query would take priority over the position sharing, removing the shared position pin and centering on the search query result instead. Fix : When a position is shared, it sets the marker url parameter, which means we can decide that when a marker is present, we should not center on the query result.

Test link

cypress[bot] commented 2 months ago

web-mapviewer    Run #3298

Run Properties:  status check passed Passed #3298  •  git commit b75e406ff4: Merge pull request #1017 from geoadmin/bugfix-PB-804-dont-follow-search-on-posit...
Project web-mapviewer
Branch Review develop
Run status status check passed Passed #3298
Run duration 05m 13s
Commit git commit b75e406ff4: Merge pull request #1017 from geoadmin/bugfix-PB-804-dont-follow-search-on-posit...
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 21
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 210
View all changes introduced in this branch ↗︎
ltkum commented 1 month ago

there's still some issues with the notation crosshair=x,y, see https://sys-map.int.bgdi.ch/preview/bugfix-pb-804-dont-follow-search-on-position-sharing/index.html#/map?swisssearch=2672000,1216250&center=2557000,1196750&crosshair=2557000,1196750

it should open the viewer over lake Neuchatel, but is still moving to the searched coordinates instead

Found out the issue and it should now work as expected