views:

452

answers:

1

Hey guys.

I've been building a small library for myself for a job I have at the moment building a map for a university.

I've gotten pretty well everything I need in some basic form, but one thing has simply not been working, and is simply not giving me results.

The university itself is sort of in a partnership with the neighboring college. It's been decided that both campuses should be included. I need to be able to toggle on/off the overlays of the campuses individually.

i.e. Start with all campuses ON. User then turns OFF college campus, university overlay stays up. User can then turn it back on to display the college once more, or turn off the university as well, leaving no overlays.

Here's a work in progress I'm doing at the moment: http://bgsweb.ca/maps/generator.html

Basically, we need to take the one overlay, split it into multiple overlays, and enable the toggling of each individual overlay.

Any assistance much appreciated!

A: 

Exactly what are you stuck on?

Individual overlays can be attached-to or removed-from the map with OverlayView.setMap(). To remove an overlay from the map you just set the overlay's map to null

overlay.setMap( null );
Peter Bailey
It may be the way that I'm building the page then, because that's what I've been trying, and it's not working. I'll keep at it.
Douglas