Show TOC

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


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


In this example, the root entity is AllocationTable, the subordinate entity is Site (navigation property: CAUKO_TO_DC). The subordinate entity generates several addresses during runtime.

<Annotations Target="CB_ALLOCATION_TABLE.SRV.AllocationTable"> <Annotation Term="UI.HeaderInfo"> <Annotation Term="UIBadge"> . . . <Annotation Term="UI.Facets"> . . . <Record Type="UI.ReferenceFacet"> <Annotation Term="UI.Map"/> <PropertyValue Property="Label" String="SiteAddress"/> <PropertyValue Property="Target" <AnnotationPath="CAUKO_TO_DC/@UI.GeoLocation"/> </Record> 
  1. On root level, 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, Site Address

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

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

    • <PropertyValue Property="Target" <AnnotationPath="CAUKO_TO_DC/@UI.GeoLocation" defines where the address data displayed on the map is coming from.

      It defines the navigation property CAUKO_TO_DC. The navigation property defines which subordinate entity is assigned to the root entity.

On sub-entity level, insert the following coding:

<Annotations Target="CB_ALLOCATION_TABLE_SRV.Site">                      <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> 

<Annotations Target="CB_ALLOCATION_TABLE_SRV.Site"> defines for which subordinate entities the geolocation is defined. The tag indicates that the geolocation is defined for the entity Site of the OData Service CB_ALLOCATION_TABLE_SRV.

The tag <PropertyValue Property="label" Path="FormattedAddressField"/> represents the name of the field with a formatted address in the search model. The information is provided by the OData service. The system generates multiple addresses for the entity Site during runtime .