Esc3300 created this task.
Esc3300 added projects: Wikidata, Wikidata-Query-Service.
Herald added a subscriber: Aklapper.
Herald added a project: Discovery.

TASK DESCRIPTION

To define layers in mapview the following is currently needed.

Below a working sample to illustrate this.

#defaultView:Map
SELECT ?item ?itemLabel ?layer ?coor
{
	?item wdt:P1435 wd:Q9259 . 
  	?item wdt:P17 ?country .
	?country wdt:P30 wd:Q18 .
  	?item wdt:P625 ?coor
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . 
                            ?country rdfs:label ?layer . 
                            ?item rdfs:label ?itemLabel  }
}

If ?layerLabel could be used instead, this could be simplified to:

#defaultView:Map
SELECT ?item ?itemLabel ?layerLabel ?coor
{
	?item wdt:P1435 wd:Q9259 . 
  	?item wdt:P17 ?layer .
	?layer wdt:P30 wd:Q18 .
  	?item wdt:P625 ?coor
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Simply defining ?layer in SELECT isn't possible. This is not specific to mapview.

#defaultView:Map
SELECT ?item ?itemLabel (?countryLabel as ?layer) ?coor
{
	?item wdt:P1435 wd:Q9259 . 
  	?item wdt:P17 ?country .
	?country wdt:P30 wd:Q18 .
  	?item wdt:P625 ?coor
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

TASK DETAIL
https://phabricator.wikimedia.org/T144735

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Esc3300
Cc: Aklapper, Esc3300, mschwarzer, MelodyKramer, Avner, debt, Gehel, D3r1ck01, Jonas, FloNight, Xmlizer, Izno, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to