HERE Navigation Routing API Example on a Node-RED Dashboard
Use the HERE.com Routing APIs to build a map navigation dashboard and plot the route on a Node-RED Dashboard. Use the Watson Text to Speech service to narrate the route.
This example flow and Node-RED Dashboard might be useful as part of a Call for Code solution that uses HERE Technologies APIs. Natural disaster applications could guide someone to safety.
- Install Node-RED on your system or in the cloud
- This flow can be deployed to IBM Cloud by creating a Node-RED Starter Application
- This flow requires Node-RED v1.1 or higher
- Add the following nodes to your Node-RED palette
- Signup for a HERE Developer account
- Signup for an IBM Cloud account
- Create a (free) instance of Watson Text to Speech
Get the Code: Node-RED flow for HERE Routing / Navigation
This flow has four sections:
- The Starting and Destination Locations / Geocode section displays a Node-RED Dashboard form which prompts the navigator to enter their starting location and ending destination. The flow then calls the HERE Geocode Search API to determine the latitude and longitude of the two waypoints.
- The Request Driving Navigation Instructions section calls the HERE Routing API to calculate the route between the two locations. It builds a table of these driving instructions and displays a summary of the route distance and driving duration.
- The Draw Map and Route section moves the car on the node-red-contrib-web-worldmap as the navigator clicks on the Navigation Preview button.
- The Read the Driving Instructions section determines if the mute slider is on / off and uses the Watson Text to Speech service to read the driving instructions aloud. Paste your Watson Text to Speech credentials into the node.
Enjoy! Give us feedback if you have suggestions on how to improve this tutorial.
This tutorial is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.