SDII Data

SdiiDataSource is used to visualize the Sensor Data Ingestion Interface (SDII) data stored in the HERE platform.

  1. To start, create an instance of SdiiDataSource and connect it to MapView as follows:

     const sdiiDataSource = new SdiiDataSource({
          dataProvider: new DataProvider({
             hrn: "HRN string",
             layer: "Layer ID where data is stored",
             environment: "here",
             getToken: async () => "Your Token"
          })
     });
     mapView.addDataSource(sdiiDataSource);
    
  2. Then, to visualize the SDII data for a certain tile, call the selectTile method as follows:

     sdiiDataSource.selectTile(tileMortonCode);
    

Optional Parameters

You can provide additional parameters to the SdiiDataSource constructor to alter the default behavior of the datasource instance:

  • enableAnimation { boolean }: This option switches the animation of SDII messages on or off.

  • animationAgent { AnimationAgent }: An instance of AnimationAgent to control an animation of SDII messages. Must be used with enableAnimation: true.

  • simulationPortion { number }: Animate messages one-by-one, instead of all at once.

  • enableSignsTexture { boolean }: SdiiDataSource can visualize road signs in two ways - either as colored dots representing only the sign's permanency type (static, variable, or deactivated) or as an icon with an actual road sign image (stop signs, speed limit signs, and more). The same applies for other types of icons.

    • enableSignsTexture: true: A texture is used to represent path events.

    • enableSignsTexture: false: Path events are displayed as colored dots.

  • intersectionAgent { InteractiveIntersectionAgent }: An instance of InteractiveIntersectionAgent that fires events when an intersection with a geometry object happens or changes. Use it to set custom handlers for mouse-over events or clicks registered on SDII messages.

Example App

Before you can visualize SDII 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 portal.

To visualize SDII data from a catalog, follow these steps:

  1. Install the web app generator and enter your application name when prompted.

  2. Select SDII data when prompted What kind of data will you visualize on top of the Base map?.

    SDII data is the default option, so you can also press Enter.

  3. When prompted HRN of the Catalog you want to visualize?, enter the HRN of the catalog that contains SDII data.

  4. When prompted Name of the layer you want to visualize?, enter the name of the layer that contains SDII data.

  5. When prompted On which level the data is stored?, enter the minimum zoom level that is required for the data to render.

  6. Once the code is generated, you can build and serve the web app by running the following command:

    npm run start
    
  7. Next, open http://localhost:8080 in your favorite web browser to see the generated app.

    To see the base map, update the authentication form with the credentials that you obtained from the platform portal.

results matching ""

    No results matching ""