pedrocoder / googleMaps-Distance-Service

example to calculate distance between 2 points

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. 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;

  1. Install the dependencies:

npm i

  1. Run the project

ionic serve -l

Distance between 2 points

Search for device latitude and longitude (ORIGIN);

It has 2 inputs to define target latitude and longitude;

Button for calculating distance and approximate time.

View this

About

example to calculate distance between 2 points


Languages

Language:TypeScript 44.9%Language:HTML 26.9%Language:CSS 23.5%Language:JavaScript 4.7%