On https://query.wikidata.org/, you can easily display the result of a query on a dynamic map (see the Venues in Broadway for example). But if you want to add this map to Wikipedia or any other Wikimedia project, you can't (except if you take a screenshot..).
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T67626 [Epic] Support for queries on-wiki (automated list generation) | |||
Open | None | T188291 Display point features (coordinates) from the results of a SPARQL query on a map in Wikipedia |
Event Timeline
It is possible look here for example:
https://de.wikivoyage.org/wiki/Spiekeroog
@Yurik can explain you how it works.
I see only one map in this page which (if I'm not wrong) is not based on a SPARQL query. Are you sure this is the right page?
@Evad37 has just confirmed here that this is not currently possible.
Since Kartographer already supports SPARQL queries (for geoshapes) and fetching coordinates from Wikidata based on a fixed list of Wikidata ids, I assume that it shouldn't be such a big change to display the results of a SPARQL query as geopoints on a map. WDQ already do that very well.
To clarify, what is wanted is a new external data service that takes in a query, looks up the P625 for each item from the query, and displays these as point features on a map
(in a similar way to how point features are displayed for geoJSON like { "type": "Point", "coordinates": [-150, 64] })
Basically, we should be able to use syntax like
<mapframe> { "type": "ExternalData", "service": "geopoint", "query": " // query goes here "} </mapframe>
to display point features based on wikidata coordinates, without having to know the wikidata ids in advance.
It would also be nice if there was a way to individually specify the Maki marker image, similar to how the geoshape example can specify fill colours for shapes.
Plus if there was also a way to just specify one or more wikidata ids without a query, then T178321 could be solved without having to use Lua.
I want this too. Actually a deceptively simple thing that would be quite useful on Wikimedia Commons as well.
For instance, on gallery pages about artist James Ensor I want to include dynamic Wikidata-driven maps indicating the cultural institutions that have his works in their collection (simple query), where the map auto-updates as we add more works (and corresponding collections/institutions) on Wikidata.