Page MenuHomePhabricator

Display point features (coordinates) from the results of a SPARQL query on a map in Wikipedia
Open, LowPublic

Description

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..).

Event Timeline

Ayack created this task.Feb 26 2018, 6:12 PM
Restricted Application added projects: Wikidata, Discovery. · View Herald TranscriptFeb 26 2018, 6:12 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ayack renamed this task from Display results of a SPARQL query on a map to Display results of a SPARQL query on a map in Wikipedia.Feb 26 2018, 6:13 PM

It is possible look here for example:
https://de.wikivoyage.org/wiki/Spiekeroog

@Yurik can explain you how it works.

Ayack added a comment.Feb 28 2018, 5:23 PM

It is possible look here for example:
https://de.wikivoyage.org/wiki/Spiekeroog

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?

Ayack added a subscriber: Evad37.Jun 7 2018, 7:44 AM

@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.

Evad37 added a comment.Jun 8 2018, 3:38 AM

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.

Evad37 renamed this task from Display results of a SPARQL query on a map in Wikipedia to Display point features (coordinates) from the results of a SPARQL query on a map in Wikipedia.Jun 8 2018, 3:40 AM
putnik added a subscriber: putnik.Jun 25 2018, 4:35 PM
Haros added a subscriber: Haros.Sep 18 2018, 10:32 PM
MSantos triaged this task as Low priority.Sep 25 2018, 3:31 PM
MSantos moved this task from Unsorted to Feature requests on the Maps (Kartographer) board.