The term custom data implies data in any format that is not supported by the standard Data Inspector Library renderer plugin.
GeoJsonDataSource allows you to visualize custom data by creating your custom renderer 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:
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 Basemap?.
HRN of the Catalog you want to visualize?, enter the HERE Resource Name (HRN) of the catalog that has the GeoJSON renderer.
Name of the layer you want to visualize?, enter the name of the layer that has the GeoJSON renderer.
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.jsfile in the root directory of your web app.
This file is a template for creating your custom plugin. The template exports the required function
toGeoJSONwhich 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 renderer plugins, see Create Renderer Plugins.