- 12 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Google Maps Integration
- Updated on 12 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Overview
Example Lab Details | |
Version | 6.4.0 |
Root Folder | Example Lab - Google Maps Integration |
Modules | None |
Dependencies | None |
This Example Lab project demonstrates how to use Google Maps integration to get the distance and duration by car between two user-specified addresses.
Explanation
This project works by using a REST service that calls the Google Maps API in the flow. By editing details in the URL (relative to base) using brackets "{}" the user can create variables that are displayed as flow step inputs. In this example, the destination and origin are edited to require user input for dynamic output. The user can enter any valid address and this step will output the distance in KM between the two destinations as well as the travel time by car. This data is output in JSON format which then needs to be deserialized with the JSON deserialize step and broken down into specific categories. The Flow finishes with a popup that will display the user-selected origin and destination as well as the distance and travel time between them.