[bug] mapview on Wikidata Query Service misaligned across 180 longitude line, selection with wikibase:box
Open, NormalPublic


The following bounding box stretches across 180 long. The wikibase:box correctly interprets the coordinates, but the map can't zoom on the area.


wd:Q47863 wdt:P625 ?SCloc . #Midway Atoll as NorthEast Point(-177.35 28.2)
wd:Q43296 wdt:P625 ?SJloc . #Wake Island as SouthWest Point(166.633333333 19.3)
SERVICE wikibase:box {
    ?place wdt:P625 ?location .
    bd:serviceParam wikibase:cornerNorthEast ?SCloc .
    bd:serviceParam wikibase:cornerSouthWest ?SJloc .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?place rdfs:label ?placeLabel }



Esc3300 created this task.Jul 9 2016, 5:24 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 9 2016, 5:24 AM
Restricted Application added a project: Discovery. · View Herald TranscriptJul 9 2016, 5:24 AM
Esc3300 added a project: Maps.
MaxSem added a subscriber: MaxSem.

Please don't add unrelated projects.

Smalyshev triaged this task as "Normal" priority.Jul 22 2016, 12:08 AM
Smalyshev assigned this task to Jonas.
Smalyshev moved this task from Ready for work to GUI on the Wikidata-Query-Service board.
Jonas added a comment.EditedJul 22 2016, 8:44 AM

Sorry I don't understand the actual problem. Could you please provide steps to reproduce and a screenshot if possible?

I think the issue is that if the box crosses the 180/-180 longitude line, the points show on the different sides of the map - i.e. left and right borders - and if you move/zoom the map around so that the line would be in the center of the screen, only one half of points is displayed, and the other half goes off screen.

yes. Ideally the map would just focus on the area covered by the bounding box.

Jonas added a subscriber: aude.Aug 5 2016, 8:32 AM

I am not sure if we can solve this maybe @aude has an idea.

How does the zoom calculation currently work?

Esc3300 added a comment.EditedAug 5 2016, 1:02 PM

Maybe a manual option to center the map on 180° could do?

Starting from there points would be split between the left and right and focus determined as currently.

It might be interesting for APAC users in general.

Esc3300 added a comment.EditedAug 17 2016, 10:37 AM

What could work is the following:

If the zoom is for more than 270°, it could attempt to re-calculate it on a center with 180°.

If this leads to less than 270°, use the map centered on 180°.

Not sure if 270° is the ideal limit: it could be 330°, but it neededn't be 360°.

Jonas removed Jonas as the assignee of this task.Nov 16 2016, 8:31 AM
Jonas added a project: Need-volunteer.
Jonas added a subscriber: Jonas.