Page MenuHomePhabricator

<maplink/frame> without lat/long should use coordinates from Wikidata
Closed, ResolvedPublic

Description

When <maplink zoom=5 /> is placed on a page, it should automatically use the corresponding coordinates from Wikidata's item

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Maybe implement this when there's no external data reference. Otherwise it would be nice if no lat/long would result in external data being auto-centered and auto-zoomed (T187741).

This is now more or less implemented via Wikibase Client's {{#statements:}} parser function. See https://www.wikidata.org/wiki/Wikidata:How_to_use_data_on_Wikimedia_projects#Formatted_values. So I think <maplink/frame> without lat/long could be used for auto-positioning consistently, and templates/modules can handle Wikidata coordinates if more flexibility is needed than {{#statements:}} allows.

thiemowmde subscribed.

While this is probably more semi-automatic, this is now possible since T307695: Display coordinate markers in Kartographer maps from QID. Minimal example: <mapframe width="300" height="300">{ "type": "ExternalData", "service": "geopoint", "ids": "Q8288" }</mapframe>. It's also possible to do this from a Lua module with the id filled in automatically.