On Jan 6, 1:21 pm, Updater <[email protected]> wrote:
>
> I plot my layer as UKTraffic in the above example, but when I call
> hideTraffic(); using the onclick event nothing happens...

var UKTraffic = [];
map.removeOverlay(UKTraffic);

removeOverlay doesn't remove an array, only single objects. Compare
addOverlay:
map.addOverlay(UKTraffic[i]);

If you want to remove the entire collection, you need to loop through
the array and remove them individually.

Andrew
--~--~---------~--~----~------------~-------~--~----~
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