In my current project the user draws a path using an editable polyline. As the user draws the map pans to the last added vertex (using map.panTo(poly.getVertex(poly.getVertexCount()-1))) - but I'd like to allow the user to edit intermediate points as well, and then centering the map to the last edited vertex.
This seems to require getting the mouse position when the user drops the vertex, and the figuring out which vertex is closest to this point(?) But this seems potentially error prone, and it would be much nicer to just have a reference to the edited vertex in the lineupdated event handler. On 29 Aug., 09:27, Mike Williams <[EMAIL PROTECTED]> wrote: > Wasn't it mat who wrote: > > > > >I'm open for other suggestions :) > > Would it be possible to take a copy of the polyline before each editing > step, then, when you get a lineupdated event you can loop through them > both looking for different .getVertex() values? > > --http://econym.googlepages.com/index.htm > The Blackpool Community Church Javascript Team --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
