Thursday, November 11, 2010

[Google Maps API v2] Re: Highlighting multiple road sections.

On Nov 11, 5:06 am, Adam <adamj...@gmail.com> wrote:
> Given 2 intersections, it is possible to have the API draw a
> line on or highlight that section of road between those points?
>
> For example 2nd St and Green Street to 2nd St and Yellow Street.
>
> I can geocode and plot these 2 just fine and draw a straight
> line between them, but will the API attach the points to 2nd
> Street and draw the line on the road around the curves of the
> road automatically?

Like this?
http://www.geocodezip.com/example_geo2.asp?addr1=2nd%20St%20and%20Green%20Street&addr2=2nd%20St%20and%20Yellow%20Street&geocode=1&geocode=2

>
> I would also like to highlight multiple unattached segments on a
> map at one time
>
> So,
> 2nd St and Green St to 2nd St and Yellow St.
> 4th and Blue St to 4th and Red St
> etc.

That is a little more technically challenging, GDirections is
asynchronous and subject to rate limits and quotas. If all the
segments are known ahead of time you could save them, then display
them on the map when the map loads without using the GDirections
service.

-- Larry

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate