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

[Search Map] Enable preserve a specified URL zoom parameter on page load #2707

Open
wants to merge 1 commit into
base: collector
Choose a base branch
from

Conversation

DieBatzen
Copy link
Contributor

Enables #2545 after GS tech update.

@DieBatzen DieBatzen force-pushed the Search-Map-Fix-Preserve-a-specified-URL-zoom-parameter-on-page-load branch from 3a529d8 to e931a4d Compare February 1, 2025 20:39
@DieBatzen DieBatzen marked this pull request as draft February 1, 2025 20:40
@2Abendsegler
Copy link
Owner

@DieBatzen
Moin,
great that you're continuing to work on the search map.
I've opened the new issue #2708 where we can coordinate the work on the search map. Please send a short message there in the future if you take on any of the work so that we don't do anything twice.
I've registered you there for the function setZoom.

@DieBatzen DieBatzen force-pushed the Search-Map-Fix-Preserve-a-specified-URL-zoom-parameter-on-page-load branch from e931a4d to 262dac6 Compare February 2, 2025 15:30
@DieBatzen DieBatzen marked this pull request as ready for review February 2, 2025 15:39
@DieBatzen
Copy link
Contributor Author

As usual, an unexpected issue showed up. :(
This time, FF behaves slightly different than Chrome. Even worse, one day before it didn't - at least it wasn't observable ...
Long story short, now the code works in both, FF and Chrome.

PR is now ready for merge.

@DieBatzen
Copy link
Contributor Author

@DieBatzen Moin, great that you're continuing to work on the search map. I've opened the new issue #2708 where we can coordinate the work on the search map. Please send a short message there in the future if you take on any of the work so that we don't do anything twice. I've registered you there for the function setZoom.

Good idea.
I'll add a comment there if and before I'm taking over a task.
And hopefully we didn't overlap on this task here ...

By the way, assignment for setZoom got somehow swapped with scrollInCacheList.

@2Abendsegler
Copy link
Owner

@DieBatzen
Moin,
I haven't tested yet.
I can't really reproduce it right now. Maybe I just don't understand what it's about. For example, if I select the Search geocaches button on the Browse Map, I get to the Search Map. There the zoom parameter is always set to 11, regardless of what was previously passed on via the url. From my point of view, the passed zoom parameter is ignored, but is not set to 14 but to 11.

Maybe we should continue to only execute unsafeWindow.MapSettings.Map.setZoom(zoom); if a zoom parameter was passed.

In the current version it said

if (zoom !== 14) {
    unsafeWindow.MapSettings.Map.setZoom(zoom);
}

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

Successfully merging this pull request may close these issues.

2 participants