Skip to content

Commit 1927996

Browse files
author
Paweł Marynowski
committed
feat(map): limit results to monuments
1 parent a4d68b1 commit 1927996

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/components/main/map/map.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@ function controller($location, $scope, $state, $stateParams, $timeout, leafletDa
3939

4040
function getDataBB(bounds) {
4141
vm.loading = true;
42-
wikidata.getSPARQL(`SELECT ?item ?itemLabel ?admin ?adminLabel ?image ?coord WHERE {
42+
wikidata.getSPARQL(`SELECT ?item ?itemLabel ?admin ?adminLabel ?image ?coord ?heritage WHERE {
4343
SERVICE wikibase:box {
4444
?item wdt:P625 ?coord .
4545
bd:serviceParam wikibase:cornerWest "Point(${bounds.getSouthWest().lng} ${bounds.getSouthWest().lat})"^^geo:wktLiteral .
4646
bd:serviceParam wikibase:cornerEast "Point(${bounds.getNorthEast().lng} ${bounds.getNorthEast().lat})"^^geo:wktLiteral .
4747
}
4848
OPTIONAL { ?item wdt:P131 ?admin . }
4949
OPTIONAL { ?item wdt:P18 ?image . }
50-
SERVICE wikibase:label { bd:serviceParam wikibase:language "pl" }
50+
?item wdt:P1435 ?heritage .
51+
SERVICE wikibase:label { bd:serviceParam wikibase:language "${langs.join(',')}" }
5152
}`).then((data) => {
5253
vm.map.markers = {};
5354
vm.list = data.map(element => setListElement(element));

0 commit comments

Comments
 (0)