Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the shortest path between two points in google maps

I dont know if this is google's proprietary thing or its opensource. I need to know the way google does show the different routes and also the shortest of them based on available roadway. Because I have created an google maps app where user can put a marker and so get the simplest(shortest in my sense) to the destination with the available roads(not just the line as this Q shows (Google MAP API: How to draw shortest plane path between two geo-points?)

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

Thanks,

like image 878
Clone Avatar asked Jan 25 '13 00:01

Clone


1 Answers

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

This is provided in the google maps API.

Documentation

like image 88
Seain Malkin Avatar answered Nov 16 '22 07:11

Seain Malkin