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

Description

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

#defaultView:Map
SELECT * WHERE {

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 }

}

https://query.wikidata.org/?#%23defaultView%3AMap%0ASELECT%20%2a%20WHERE%20%7B%0A%20%20wd%3AQ47863%20wdt%3AP625%20%3FSCloc%20.%20%23Midway%20Atoll%20as%20NorthEast%20Point%28-177.35%2028.2%29%0A%20%20wd%3AQ43296%20wdt%3AP625%20%3FSJloc%20.%20%23Wake%20Island%20as%20SouthWest%20Point%28166.633333333%2019.3%29%0A%20%20SERVICE%20wikibase%3Abox%20%7B%0A%20%20%20%20%20%20%3Fplace%20wdt%3AP625%20%3Flocation%20.%0A%20%20%20%20%20%20bd%3AserviceParam%20wikibase%3AcornerNorthEast%20%3FSCloc%20.%0A%20%20%20%20%20%20bd%3AserviceParam%20wikibase%3AcornerSouthWest%20%3FSJloc%20.%0A%20%20%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%20%3Fplace%20rdfs%3Alabel%20%3FplaceLabel%20%7D%0A%7D

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.