Page MenuHomePhabricator

Investigation: Look into the worldCopyJump setting to drag along features
Closed, ResolvedPublic

Description

If you're on a map with features drawn onto it and zoom out until you see the horizontal repetition of the world map, you will see that the features will only be shown on one of these world maps. That's an implementation detail of the used Leaflet library.

So scrolling horizontally over the 180° meridian in either directions can get the user to a world map view that does not include the features.

To avoid "loosing" the features when scrolling horizontally there's a worldCopyJump setting for the Leaflet map. Let's find out if it helps solving this issue without causing other ones.

[1] https://en.wikivoyage.org/wiki/Taveuni#/map/0/0/-17/-0

Event Timeline

Test worldCopyJump with different scenarios, especially edge cases around the 180° meridian e.g. [1] or from T195654 T313615 T229174
Make sure zooming in and clicking markers at the edges does not let the features "jump away"

The idea works in principle but could really give weird effect on objects near/spanning the anti-meridian:

worldCopyJump.gif (768×1 px, 3 MB)

Test possible alternative that prevents zooming out https://leafletjs.com/reference.html#map-fitworld

This option does not help very much here. It could be used to block users from zooming out too far, but users could still move "off" the world and can see strangeness around the edges of the anti-meridian.

WMDE-Fisch updated the task description. (Show Details)
WMDE-Fisch moved this task from Doing to Demo on the WMDE-TechWish-Sprint-2023-03-14 board.
WMDE-Fisch claimed this task.
WMDE-Fisch moved this task from Demo to Done on the WMDE-TechWish-Sprint-2023-03-14 board.

Investigation finished. We won't use that options due to the mentioned disadvantages.