Page MenuHomePhabricator

<maplink> position is broken
Closed, ResolvedPublic

Description

This link opens a popup for lat=0, long=0

<maplink zoom="13" longitude="-122.39662170410156" latitude="37.79839089938073" />

Event Timeline

Yurik created this task.Aug 31 2016, 8:25 PM
Restricted Application added a project: Discovery. · View Herald TranscriptAug 31 2016, 8:25 PM
Restricted Application added subscribers: Jay8g, Luke081515, TerraCodes, Aklapper. · View Herald Transcript

Change 307878 had a related patch set uploaded (by MaxSem):
Fix maplink

https://gerrit.wikimedia.org/r/307878

This is a regression of https://gerrit.wikimedia.org/r/#/c/302081/

Since this patch, center&zoom have always been passed, regardless whether they are valid or not. The problem is that when it comes to the setViewmethod, if center&zoom are either invalid or undefined, the map tries to position itself based on the data layers. In this example, there is no data layer so the map stays at center=[ 0, 0 ]

I tried, and I could reproduce the same bug with <mapframe> :(

Change 307883 had a related patch set uploaded (by MaxSem):
Fix maplink and mapframe when lat/lon/zoom are undefined

https://gerrit.wikimedia.org/r/307883

Change 307878 merged by jenkins-bot:
Fix maplink and mapframe when lat/lon/zoom are undefined

https://gerrit.wikimedia.org/r/307878

Change 307883 merged by jenkins-bot:
Fix maplink and mapframe when lat/lon/zoom are undefined

https://gerrit.wikimedia.org/r/307883

Yurik closed this task as Resolved.Aug 31 2016, 11:17 PM
Yurik claimed this task.

Thanks!