lakshman
lakshman

Reputation: 2741

drawing a path between two cities on google static map

I want to draw a path between two cities on a google static map along a road according to a suggested route of google map.when I used path attribute with pipe characters I can draw a line but not along a road. for drawing it along a road suggested by google map what should i do?is that possible on google static map?

Upvotes: 2

Views: 1993

Answers (1)

Pratik
Pratik

Reputation: 30855

You can definitely do this with the Static Maps API:

get directions using DirectionsService:

http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsService

and convert the overview path to suit the requirements of the Static Maps API:

http://code.google.com/apis/maps/documentation/staticmaps/#Paths

Upvotes: 4

Related Questions