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:data::olp-here:rib-2", layer name: "topology-geometry", level: 12
To visualize custom data from the sample catalog, follow these steps:
Install the web app generator and enter your application name when prompted.
Select the option
What kind of data will you visualize on top of the Base map?.
HRN of the Catalog you want to visualize?, enter the HERE Resource Name (HRN) of the catalog that has the GeoJSON rendering.
Name of the layer you want to visualize?, enter the name of the layer that has the GeoJSON rendering.
On which level the data is stored?, enter the minimum zoom level that is required for the data to render.
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.
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
getGeoJSON which converts the raw JSON data from a decoded partition into a GeoJSON object.
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.