How to get the shortest path between two points on Google maps

I don't know if this is Google's proprietary thing or its open source. I need to know how Google shows different routes, as well as the shortest of them based on the available road . Because I created a Google map application where the user can place a marker and thus get the simplest (shortest in my sense) destination with accessible roads (not just a line as this Q shows ( Google MAP API: how to draw the shortest path between two geographical points?

I know this applies to Dijkstra's algorithm for the shortest path. but I was wondering if there is any library that I can use out of the box.

Thank,

+5
source share
2 answers

Looks like you just want to find directions from one point to another?

This is specified in the google maps API.

Documentation

+1
source

Google has published a guide on how to do this: https://developers.google.com/maps/documentation/directions/

0
source

All Articles