Chuck Fletcher
2007-Jul-13 16:38 UTC
[Ym4r-user] layers of polylines, events building up on map
Hi all,
Here''s my situation:
I have a little route creation app that lets a user create a route.
I''m using the mapstraction version of ym4r...
here is the workflow:
first page has a map displaying the start point of existing routes.
if they click "new route:
creates a route_object
clears all polylines in case there are any
clears all the markers and adds an onclick event.
for each click I:
clear all polylines with RJS
add point to the waypoint table (with route_id)
select all waypoints for the route and build a polyline
display the polyline
that all works fine....
but if I hit the create route button again
as I click the polylines from the last route flash and then go away
also it seems that my onclick events are multiplying as well (2 clicks
are registered when I click once)
and if I hit new route again it becomes 3, etc.
Any ideas on how to clear out my events and polygons completely when I
create a new route?
Thanks for the help!
Chuck
