[Search Map] Enable preserve a specified URL zoom parameter on page load (Tech migration)#2707
Conversation
3a529d8 to
e931a4d
Compare
|
@DieBatzen |
e931a4d to
262dac6
Compare
|
As usual, an unexpected issue showed up. :( PR is now ready for merge. |
Good idea. By the way, assignment for |
|
@DieBatzen Maybe we should continue to only execute In the current version it said |
262dac6 to
5280d05
Compare
It's more dynamic. In another area, https://www.geocaching.com/map/#?ll=52.52735,13.41185&z=15 (zoom=15) on browse map gives https://www.geocaching.com/live/play/map?sort=distance&asc=true&st=N+52°+31.641'+E+13°+24.710'&lat=52.52735&lng=13.4118333333333&ot=coords&r=16&zoom=13 (zoom=13) on search map. The first example has low cache density, the second has high cache density. It looks like the number of resulting caches, together with the search radius of 16km (r=16) from the URL, determines the zoom level.
In the actual code, |
|
During investigation of your remarks, another (mean) issue in FF showed up: This is now also taken into account in the code and the branch is force-pushed with the changes. |
|
Moin. I didn't know that GS determines the zoom parameter based on the cache density. That's not uninteresting. I've given our feature some thought. With our feature we want to ensure that a specified zoom parameter is applied and not changed by GS. If no zoom parameter is specified, we shouldn't just set any meaningful zoom parameter. In such a case, GS should set the zoom parameter. In my view, it makes sense that GS sets a different zoom parameter when the cache density is high than when the cache density is lower. Of course, you can also prefer a zoom parameter at a fixed height. The height is probably judged differently. But... that would be another, different feature. Our feature should only be about applying the specified zoom parameter. A little bug: With the current coding, an URL without a zoom parameter (https://www.geocaching.com/play/map) is always adjusted to 14 when you zoom in or out. So you can't get away from 14. Can you please think about the feature again? |
I don't have a strong opinion about that "meaningful zoom parameter" and am perfectly fine with skipping it. The main idea was to prevent e.g. initial views with quite small zoom level, such as zoom=10 when calling the default link to search map https://www.geocaching.com/live/play/map (at least with our home coordinates).
It's rather a feature than a bug. ;) That's the only reliable solution I could come up with that works in both, Firefox and Chrome in all cases. The only downside of this approach is what you observed: if you zoom in/out very shortly after page load, you might notice that the zoom level stays as it is ... and that resolves itself, on some of the next tries. Maybe a reasonable solution is to simply disable the zoom buttons for this time period?
Done. ;) |
Yes, I see it the same way. We can perhaps implement this in a variable form on another occasion, so that the user can specify the zoom parameters themselves.
You're right. I thought it would be longer, but I can't reproduce that. |
|
Ich noch mal. :) Ich habe noch etwas mehr getestet mit übergebenem Zoom Parameter. Die Wiederholung von 5 Sekunden empfinde ich als ziemlich störend. Wenn ich das Mausrad mit dem Zoom bewege fährt die Karte quasi mehrfach rein und raus. Auch wenn ich die Karte verschiebe, wird sie innerhalb der Zeitspanne wieder zurück geschoben. Und manchmal wird zwischendurch auch wieder auf die Zoom Stufe von GS zurückgesetzt, vermutlich durch GS. Andererseits möchte ich auch nicht 5 Sekunden warten bis ich loslegen kann. Wenn man die 5 Sekunden wegstreicht und die Zoom Stufe nur einmal setzt, so wie es früher wohl mal funktioniert hat, landet man in einigen Fällen nicht auf der beabsichtigten Zoom Stufe. Da hast du völlig recht. Ich habe das jetzt in Firefox auch einige Male gesehen. Ich habe dieses Feature ganz anders in Erinnerung. Eben ohne das ganze Gezucke. Ich glaube nicht, dass es so wie es jetzt abläuft Sinn macht. Wir müssen die Implementierung dieses Feature nicht erzwingen. Wenn wir keine akzeptable Lösung finden, dann ist das halt so. So was kommt vor. Wenn dir nichts mehr einfällt, dann stell es einfach zurück, vielleicht hast du irgendwann später noch eine Idee. Oder vielleicht fällt auch jemand anderem noch was ein. Mir vermutlich eher nicht, dafür habe ich viel zu wenig Ahnung. Oder wir vergessen das Feature. Was nicht geht, geht nicht. |
Ja, da hast du recht.
Eine letzte Idee habe ich noch: Das hat in meinen Tests bisher gut funktioniert (Chrome sowieso, aber auch in FF) und könnte eine Lösung sein. Ansonsten stellen wir das Feature erst einmal zurück. |
|
Ja, hört sich super an! Hast du eine Idee warum es unter Firefox diese Probleme gibt? Verursacht das Firefox selbst oder ist eher GS dafür verantwortlich? |
Ja, die habe ich tatsächlich. :) Soweit ich das sehen kann, liegt dieser Unterschied an Tampermonkey. Somit wäre die "einfachste" Lösung, dem gclh ein Alternativ scheint die gestern erwähnte Lösung stabil zu laufen, könnte daher auch eine Option sein. |
5280d05 to
52d24a0
Compare
PR entsprechend aktualisiert. |
|
Vielen Dank für die ausführlichen Informationen!
Ich habe mir das angesehen. Das hört sich echt super an, auch wenn wir damit Gefahr laufen, dass etwas nicht mehr richtig funktioniert. Ich schätze mal die Wahrscheinlichkeit dafür ist nicht allzu groß. Vorschlag: Was meinst du? |
- enables 2Abendsegler#2545 after GS tech update - add '//@run-at document-end' to script header s.t. gclh starts its magic directly after DOM is fully loaded and parsed
52d24a0 to
d7b138e
Compare
Gute Idee. Dieser PR und Branch ist nun force-pushed mit Ich nehme den Draft-Status wieder raus und falls alles passt, kannst du ja mergen. |
2Abendsegler
left a comment
There was a problem hiding this comment.
Super, scheint zu passen!

Enables #2545 after GS tech update.