sttl.locate.locateall.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
#
# Geolocate resources on a map (except resource given lat et long)
#
prefix p:
prefix o:
prefix geo:
template st:locateall {
"var pos" st:number() " = new google.maps.LatLng("
str(?lat) "," str(?lon) ");"
"var marker" st:number() "= new google.maps.Marker({ position: pos" st:number() ", map: map, icon: '/img/smarker.png' });"
"google.maps.event.addListener(marker" st:number()
", 'click', function () {window.location.href = \""
st:call-template(st:link, ?in)
"\";});"
}
where {
?in a o:Place .
service {
?in p:longitude ?lon ;
p:latitude ?lat
}
}
pragma { kg:service kg:slice 50 }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy