[Google Maps Library] How to Calculate the distance between two coordinates?

Forge Component
(22)
Published on 26 Feb by Labs
22 votes
Published on 26 Feb by Labs

Hi is that any solution for that? Other than using the old fashion math?

2+3x4=14

2+3x4=20

2+3x4=14

2+3x4=20

Solution

Hi Chua,

You can use google API's for that, I think this one gives you duration and distance between 2 places.

You can use math, but there's already more than 1 component for that available on the community, either client or server side.

Cheers

Solution

Hi there,

You can use any Distance Matrix API for these. For example, Google Maps API, or this one (https://distancematrix.ai/pricing). It has a free pricing plan, so may fit your needs better.

Good luck!