I don't understand what causes the "endline" event to fire. Would it
be possible to do something like:
If current LatLngClick == LastVertexPnt then
GEvent.trigger("endline");
It seems like there should be some way to get the distance to show ...
On Mar 25, 9:17 am, marcelo <[email protected]> wrote:
> It's because the binding to the function that writes the distance is
> only created once the "endline" event fires:
>
> GEvent.addListener(poly, "endline", function() {
> select("hand_b");
> var cells = addFeatureEntry(name, color);
> GEvent.bind(poly, "lineupdated", cells.desc, onUpdate);
>
> //...etc
>
> --
> Marcelo -http://maps.forum.nu
> --
>
> On Mar 25, 1:52 am, Chris <[email protected]> wrote:
>
> > A while ago Keith Golden posted on the maps api blog a way to allow
> > users to create a polyline.
>
> >http://googlemapsapi.blogspot.com/2008/05/love-my-maps-use-its-line-a...
>
> > Direct link to
> > example:http://gmaps-samples.googlecode.com/svn/trunk/poly/mymapstoolbar.html
>
> > This method also produced a distance. It appears however that the
> > distance only shows up if the line is closed or after an open loop has
> > been created, a segment is changed.
>
> > This happens in both Firefox 3 and IE 8. Can anyone point out why it
> > doesn't give the distance if you just create a straight line (not a
> > closed segment) on the first try?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---