Show TOC

Example: Single Geographic Information on Root-Entity LevelLocate this document in the navigation structure

Use

Follow the example below to include geographic information in a fact sheet on root-entity level.

Activities
<Annotation Term="UI.Facets"> . . . <Record Type="UI.ReferenceFacet"> <Annotation Term="UI.Map"/> <PropertyValue Property="Label" String="Relevant Address"/> <PropertyValue Property="Target" AnnotationPath="@UI.GeoLocation"/> </Record> 
  1. You define a new facet with the term <Record Type="UI.ReferenceFacet">

  2. You define the facet as a map with <Annotation Term=UI.Map"/> with several properties:

    • The label of the facet, Relevant Address

      The string for the relevant address can also be an alias that can be flexibly filled.

    • Further location properties defined in the UI.GeoLocation term, which is referenced by @UI.GeoLocation.

The geographic information is decoded into latitude and longitude and must be provided by the OData service. Based on latitude and longitude information, markers (pins) are displayed on the map. The address information contained in the UI.GeoLocation term is supplementary.

For the definition of the exact location, the annotation file contains the following tags:

<Annotation Term="UI.GeoLocation">             <Record> <PropertyValue Property="Latitude" Path="YPOS"/> <PropertyValue Property="Longitude" Path="XPOS"/> <PropertyValue Property="Address"> <Record> <PropertyValue Property="label" Path="FormattedAddressField"/> </Record> </PropertyValue> </Record> </Annotation> 

The location is exactly defined by the latitude and longitude as a point on a map.

With <PropertyValue Property="label" Path="FormattedAddressField"/>, the location as an address with further data provided by the OData service.