Thanks for responding Larry, Yes, two existing polylines.
I have an app in progress where the user clicks the map to add markers and I draw a polyline from one point to the next in a straight line. Very simple. I want to add the ability for them to switch modes, so that the next point they click adds a segment using directions. So part of the line will be straight lines, and part of the line will follow the road. My thought was to have a global GPolyline that I could then add other polylines to as the user clicks. The only way I could think to do it was to loop through the vertexes of the new polyline and add them to my existing polyline using the insertVertex method, but I thought maybe there was a simpler way. On Aug 27, 3:22 pm, "[email protected]" <[email protected]> wrote: > On Aug 27, 11:19 am, nmoses <[email protected]> wrote: > > > Is there a simple way to join two GPolylines together? I've seen a > > couple of posts where people mention doing this, but I don't see a way > > in the API to do it. > > Example? > > Are these two pre-existing polylines? > > Probably the easiest is to create a new polyline that contains the > points from the two lines you want to join. > > -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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 -~----------~----~----~----~------~----~------~--~---
