In either case (but I'm using V3 terms here) what you might want to do is
reverse-geocode a few points in the route and look for those
address_components that have "types": [ "locality", "political" ] as those
are likely the cities or towns you are after.

Be careful not to send too many geocoding requests in a row, otherwise
you'll get just OVER_QUERY_LIMIT responses.

I don't have code for this, but here is the idea:
1. request directions from Ankara to Istanbul
2. build an array with the start points of the resulting route's legs and
add the end of the route
3. reduce that list to something small, e.g. around 5
4. reverse geocode those points
5. take the address_components that have "types": [ "locality", "political"
] as cities

The problem is that when you do #3 you can't know where each city begins or
ends, you could end up with something like:

Ankara (Point 1)
1. Bolu
2. Bolu
3. Adapazarı
4. Adapazarı
İstanbul (Point 2)

You would need to geocode all points in #3 to be sure to avoid (a) having
the same city twice in the final list and/or (b) miss some in the final
list, but that would probably be too slow.

I hope this helps.

Cheers,
Miguel

On Fri, May 28, 2010 at 09:10, Ronny Aerts <[email protected]> wrote:

> Your code is google maps v2 not v3. This group is only for google maps v3.
>
> vriendelijke groeten,
> Ronny Aerts
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to