Alex Rivera | Logout

Google Maps API V3 : How show the direction from a point A to point B (Blue line)?

Asked 2011-05-11T05:45:09.590
74

I have latitude and longitude for 2 points on database, I want my Google Map to display a route from point A to point B...

Just like we see here (Google Maps Directions)

Image from the link

How to draw that direction line on map ?

Edit
Report

1 Answer

5

Use the directions API.

Make an ajax call i.e.

https://maps.googleapis.com/maps/api/directions/json?parameters

and then parse the responce

answered 2011-05-11T07:05:10.650

Your Answer