Page MenuHomePhabricator

On the mobile site, <mapframe> autozoom doesn't work when data is drawn on top of the basemap and the sections of the page are autocollapsed
Open, LowPublic

Description

On the mobile site, mapframes display zoomed out to show the whole world if any sort of data (GEOJSON, OSM data or Commons .map pages) are displayed on top of the basemap; the page must be loaded with the relevant section collapsed (collapsing all sections is the default behaviour on phones).

Visit this example page on a phone. The maps above the section break work correctly. Most of the ones below the break do not (the only ones that do are the one where no data is being drawn on top of the base map and the one where the zoom is manually specified).

Note that all maps display correctly if the page is reloaded with the section expanded (because the section remains expanded when the page is reloaded).

Event Timeline

Gareth created this task.Apr 16 2018, 1:00 AM
Restricted Application added a project: Discovery. · View Herald TranscriptApr 16 2018, 1:00 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Based on T193528: [mobile] Zoom controls not displayed in portrait view (closed as a duplicate), the steps to reproduce the issue are as following:

  1. On a mobile device or on Chrome mobile emulator go to https://test2.m.wikipedia.org/wiki/User_talk:Etonkovidova/sandbox (there are few samples of dynamic maps).
  2. A mobile device will display the sections collapsed - click to un-collapse them - the zoom controls will not be dispalayed:

To might be trickier to reproduce the issue In Chrome mobile emulator because after viewing a map in full-view, the zoom controls will be, in fact, displayed. Collapse the sections -reload the page - un-collapse - the controls will be gone:

Mholloway triaged this task as Low priority.Aug 14 2018, 3:59 PM
Mholloway edited projects, added Maps (Kartographer); removed Maps.