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

google mapsgoogle-maps-api-3

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 ?

Best Answer

Use directions service of Google Maps API v3. It's basically the same as directions API, but nicely packed in Google Maps API which also provides convenient way to easily render the route on the map.

Information and examples about rendering the directions route on the map can be found in rendering directions section of Google Maps API v3 documentation.