Currently, the Data Inspector Library provides two mechanisms for visualizing certain HERE Map Content (HMC) layers (Building Footprints, Cartography, Roads - Topology & Geometry):
For implementation details, see the chapters below.
Visualization through Dedicated Plugin
The dedicated rendering plugins for the Building Footprints, Cartography, and Roads - Topology & Geometry layers are included in the data schemas of these layers. To see how they work, use the Control the Visualization app that comes as part of Data Inspector Library examples. For this, in the top panel, specify the HRN of the HMC catalog and the ID of the corresponding layer, for example:
Figure 1. Building Footprints layer visualization with the rendering plugin
Note
When using a local Data Inspector instance, keep in mind that if no rendering plugin is found in the connected data schemas of the above-mentioned HMC layers, the visualization automatically falls back to RibDataSource.
HMC visualization through RibDataSource will be kept for the next 6 months and then deprecated. Consequently, only the dedicated rendering plugin will be used for visualizing the Building Footprints, Cartography, and Roads - Topology & Geometry layers.
The HERE Map Content data source allows visualizing data from several layers simultaneously.
To visualize the HERE Map Content Data from a catalog, follow these steps:
Start with creating an instance of RibDataSource and connect it to MapView as follows:
const ribDataSource =newRibDataSource({dataProvider:newRibDataProvider({hrn:"HRN string",layer:"Layer ID where data is stored",environment:"here",getToken:async()=>"Your Token"})});
mapView.addDataSource(ribDataSource);
Then, to visualize HERE Map Content for a certain tile, call the selectTile method as follows:
ribDataSource.selectTile(tileMortonCode);
Optional Parameters
intersectionAgent { InteractiveIntersectionAgent }: An instance of InteractiveIntersectionAgent that triggers events when an intersection with a geometry object happens or changes. Used to set custom handlers on mouse-over or display geometry tooltip.
dataStore.secondaryLayers { string[] }: An array of additional layers supported by the Data Store to be rendered together with the layer specified in the dataStore.layer property.
Example App
Before you can visualize the HERE Map Content Data, you need to know the HERE Resource Name (HRN) of the layer that contains the data. You can find the HRN of the necessary catalog in the Data section of the HERE platform portal.
To visualize the HERE Map Content Data from a catalog, follow these steps: