- Create project or use existing one in Google Developer Console;
In the list of Dashboard APIs, look for the Google Maps Distance Matrix API, Google Maps Javascript API, Google Maps Geolocation API and Google Maps Directions API and activate the 4;
- Install the dependencies:
npm i
- Run the project
ionic serve -l
Search for device latitude and longitude (ORIGIN);
It has 2 inputs to define target latitude and longitude;
Button for calculating distance and approximate time.