Page MenuHomePhabricator

Add return data on OSM requests
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
I would like to be able access status data from the call to Kartographer (akin to https://maps.wikimedia.org/geoline?getgeojson=1&ids=XXX, where XXX is the relevant wikidata-id, though preferable with some error data for failed attempts)

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Currently if Kartographer is called (via Module:Mapframe) to show a map that for one reason or another lack something to show (dodgy connection, no relation with the correct wikidata-tag, no wikidata-id used in call) the result will be either an empty square or a map of the world. This is neither aesthetically pleasing nor informative for anyone that wants to correct the error.

Benefits (why should this be implemented?):
By including return data that can be evaluated by LUA (or other components on the MediaWiki-side) it would be possible to provide error messages if a correct map cannot be rendered (to help people solve the error). One typical case would be if there is no relation at OSM with the wikidata set to the relevant wikidata-entity. It would also be possible to avoid showing any map at all in such case, which is likely to improve the visual appearance of templates etc. that (try to) use maps.