query-60df472863d4a82e0541d6d4abc3bef0
Outdoor gyms 10 km from your current location otherwise you get Berlin as the center of the universebrowser get your current locationWorks if you allow your
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
#title: Outdoor gyms 10 km from your current location
SELECT ?outdoorgym ?outdoorgymLabel ?location ?avst ?img WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
SERVICE wikibase:around {
?outdoorgym wdt:P625 ?location.
bd:serviceParam wikibase:center "[AUTO_COORDINATES]".
bd:serviceParam wikibase:radius "10".
bd:serviceParam wikibase:distance ?dist.
}
?outdoorgym wdt:P31 wd:Q692630.
OPTIONAL{?outdoorgym wdt:P18 ?img}
OPTIONAL {?outdoorgym wdt:P856 ?URL}
BIND (CONCAT("Distance (km) ",str(?dist)) AS ?avst)
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?URL")
v6("?avst"):::projected
v3("?dist")
v4("?img"):::projected
v2("?location"):::projected
v1("?outdoorgym"):::projected
c2(["bd:serviceParam"]):::iri
c4(["sv,en"]):::literal
c8(["#91;AUTO_COORDINATES#93;"]):::literal
c13(["wd:Q692630"]):::iri
c10(["10"]):::literal
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph s2["http://wikiba.se/ontology#around"]
style s2 stroke-width:4px;
v1 --"wdt:P625"--> v2
c2 --"wikibase:center"--> c8
c2 --"wikibase:radius"--> c10
c2 --"wikibase:distance"--> v3
end
v1 --"wdt:P31"--> c13
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P856".-> v5
end
bind0[/"concat('Distance (km) ',str(?dist))"/]
v3 --o bind0
bind0 --as--o v6