Custom Data

The term custom data implies data in any format that is not supported by the standard Data Inspector Library rendering plugin. GeoJsonDataSource allows you to visualize custom data by creating your custom rendering plugin that takes data in any format and converts it to GeoJSON.

If you want to see an example of custom data converted to GeoJSON, you can use the following sample catalog:

hrn: "hrn:here-cn:data::olp-cn-here:here-map-content-china-2",
layer name: "topology-geometry",
level: 12

To visualize custom data from the sample catalog, follow these steps:

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

  2. Select the option Custom data using custom JavaScript translators to GeoJSON when prompted What kind of data will you visualize on top of the Base map?.

  3. When prompted HRN of the Catalog you want to visualize?, enter the HERE Resource Name (HRN) of the catalog that has the GeoJSON rendering.

  4. When prompted Name of the layer you want to visualize?, enter the name of the layer that has the GeoJSON rendering.

  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
    

    To see the web app, open http://localhost:8080 in a web browser.

    To render the base map, enter the credentials that you obtained from the platform portal.

  7. Locate the renderer.plugin.template.js file in the root directory of your web app.

    This file is a template for creating your custom plugin. The template exports the required function toGeoJSON which converts the raw JSON data from a decoded partition into a GeoJSON object.

  8. Make a copy of this plugin template and adapt it according to your requirements.

    For more information on creating custom rendering plugins, see Create Rendering Plugins.

results matching ""

    No results matching ""