You use a GeoAppearance if you want to show some geographical data on a map. Two maps are includes:

To place a simple marker on the map, your data should contain a geo:long and a geo:lat property value. If you add more than one marker on the map and you want to centre the map arount a particular marker, you can state that this marker is of rdf:type elmo:GeoLocator.

To place one or more geometrical shapes on the map, your data should contain one or more geo:geometry values.

In both cases, the URI of the subject will be used to create a hyperlink to that particular URI. If you want to override this hyperlink, you should add a xhtml:link property as well. If you want to add a pop-up with a label, you should add a rdfs:label property.

Geo appearance

Tweaking the appearance

The appearance of each row can be changed with the elmo:fragment statement:

Example

The first example just places a pointer on a OpenStreet map. In this case, the rdf:type elmo:GeoLocator statement is not really necessary, because only one marker is visible.

stage:GeoAppearancePointer a elmo:Part;
	elmo:appearance elmo:GeoAppearance;
	elmo:query '''
		prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
		construct {
			<urn:pointer> rdf:type elmo:GeoLocator.
			<urn:pointer> geo:lat "52.155".
			<urn:pointer> geo:long "5.38".
			<urn:pointer> rdfs:label "Here!".
		}
		WHERE {}
	''';
.

NB: The current version of the LDT (1.12.0) contains a bug, so the example above won’t work. Instead, you should use a geo:geometry, as is used in the example above (which results in exactly the same represention, but does work).

stage:GeoAppearancePointer a elmo:Part;
	elmo:appearance elmo:GeoAppearance;
	elmo:query '''
		prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
		construct {
			<urn:pointer> rdf:type elmo:GeoLocator.
			<urn:pointer> geo:geometry "POINT((5.38 52.155))".
			<urn:pointer> rdfs:label "Here!".
		}
		WHERE {}
	''';
.

The third example shows the area of Amersfoort in the color red, using the Dutch Topographical map.

@prefix elmo: <http://bp4mc2.org/elmo/def#>.
@prefix xhtml: <http://www.w3.org/1999/xhtml/vocab#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix stage: <http://localhost:8080/stage#>. 
stage:GeoAppearance a elmo:Representation;
	elmo:appearance elmo:GeoAppearance;
	elmo:fragment [
		elmo:applies-to elmo:Appearance;
		elmo:backmap "brt";
	];
	elmo:fragment [
		elmo:applies-to "gemeente";
		xhtml:stylesheet '''
			fill: red;
			fill-opacity: .3;
			stroke: #666;
		''';
	];
	elmo:query '''
		prefix geosparql: <http://www.opengis.net/ont/geosparql#>
		prefix brt: <http://brt.basisregistraties.overheid.nl/def/top10nl#>
		prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
		construct {
			?municipal geo:geometry ?wkt.
			?municipal rdfs:label ?label.
			?municipal elmo:style brt:Gemeente.
			brt:Gemeente elmo:name "gemeente".
		}
		WHERE {
			select *
			where {
				?municipal a brt:Gemeente.
				?municipal rdfs:label ?label.
				?municipal geosparql:hasGeometry ?geo.
				?geo geosparql:asWKT ?wkt.
			}
			limit 1
		}
	''';
.