On Nov 11, 8:57 am, Adam <[email protected]> wrote: > That is similar to what I want, but I don't need the directions. These > segments are simply parts of a single road. I'm trying to highlight > different blocks of the road within the city. Some roads may be > highlighted up to 20 blocks long while others may only be a single > city block. > > Is there a way I could use GDirections, then extract the polyline > coordinates that were drawn from GDirections and save that to a > variable?
Yes, if you click on the "get polyline xml" button, that page extracts the coordinates required to recreate the line an formats them as the xml format I use for displaying polylines. > I could then save that to the database and load that line > to a map as needed? Yup. -- Larry > > On Nov 11, 7:43 am, "[email protected]" <[email protected]> > wrote: > > > > > On Nov 11, 5:06 am, Adam <[email protected]> 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%20Gre... > > > > 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- Hide quoted text - > > - Show quoted text - -- 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 [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-api?hl=en.
