Page MenuHomePhabricator

Static maps renderer does not handle autonumbering of icons in a Commons map
Open, MediumPublic

Description

When called via <maplink>, markers stored in a Commons .map page will display a broken image icon when the marker uses the "marker-symbol": "-letter" or "marker-symbol": "-number" properties. The markers display correctly on the .map page itself.

<mapframe width="300" height="300" latitude="-34.859" longitude="138.465">
{
"type": "ExternalData",
"service": "page",
"title": "Sandbox/Gareth/Sandbox.map"
}

Event Timeline

@Gareth do you have a link for an example?

TheDJ renamed this task from When called via <maplink>, markers stored in a Commons .map page will display a broken image icon when the marker uses the "marker-symbol": "-letter" or "marker-symbol": "-number" properties to Static maps renderer does not handle autonumbering of icons in a Commons map.Mar 20 2020, 8:56 AM
TheDJ edited projects, added Maps (Kartotherian); removed Maps (Kartographer).
TheDJ added a subscriber: TheDJ.

This is almost certainly somewhere in Karotherian, which translates the commons map to geodata and which apparently doesn't apply the autonumbering scheme to that specific type of maps before rendering. Should be fixible by fiding that spot and applying the same code it applies to other geojson blobs

The Commons mapdata is retrieved with the jsondata action in SimpleParser.php for Kartographer and in the dependency wikimedia/mapdata src/Group.External.js for Kartotherian:
https://github.com/wikimedia/mapdata/blob/29bc01933bacdf32e300df75b0e41d7780b4f02d/src/Group.External.js#L48

When a Feature directly uses -number or -letter, then the SimpleStyleParser does the counting and stores it 'counted' in the mapdata, where it retrieved by the InternalGroup logic via mapdata json, like for instance for this feature:
https://en.wikipedia.org/w/api.php?action=query&formatversion=2&titles=User:TheDJ/sandbox&prop=mapdata&mpdlimit=max