On Jun 12, 9:47 am, "[email protected]" <[email protected]>
wrote:
> I'm trying to build a utility for use in our office where when a
> person is adding a polyline to the database, a button is available to
> bring up other polylines (in a specific date range) for the purpose of
> checking to see if there is a conflict (i.e. overlapping polylines).
>
> All that works great, but now I would like to be able to remove all
> polylines except the one that the user has just added.
>
> Is there a simple way to do this?

The easiest thing to do would be to keep a reference to the "one that
the user has just added".  Then do map.clearOverlays() which will
remove all the overlays, then re-add the one you want to keep.

The other option is to keep track of all of the polylines (perhaps in
an array), and go through them calling map.removeOverlay on each of
the ones that you want removed (but not on the one you want to keep).

  -- Larry

>
> Here is a link to the code:
>
> http://bil.ci.billings.mt.us/pwe/City_Projects/maps/Polyline3.asp
>
> When using the tool, you have to create a polyline then use the date
> fields to check a date range of the polylines stored in a database.
>
> The polylines represent street closures or parade routes or stuff
> happening in the streets.... That's why we want to try and find the
> conflicting (i.e. overlapping) polylines....
>
> Thanks for your help!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to