Thanks giscoda it worked. On Sep 30, 1:53 pm, giscoda <kiefer.stef...@guj.de> wrote: > Hello, > > in the beginning add NULL place holders like this: > > map.overlayMapTypes.push(null); // Placeholder for Sites > Overlay > map.overlayMapTypes.push(null); // Placeholder for OSM TOP + > Sites > > and then add overlays like this: > > map.overlayMapTypes.setAt(1, mapOverlayLabels); > > or remove them this way: > > map.overlayMapTypes.setAt(1, null); > > This works for me. Here is an example:http://karte.immobilien-kompass.de > > regards > > On 29 Sep., 09:11, Prabu Raja <prab.r...@gmail.com> wrote: > > > > > > > > > Hi > > > I have a web page with 3 check boxes and map (State boundary, District > > boundary, Taluk boundary), while clicking the check boxes, it will > > load the corresponding boundary on top of map using ImageMapType. How > > do I hide a specific boundary while a user de-selects a check box. I > > tried "overlayMapTypes.removeAt(idx)" option, but it has the following > > problem. > > > Lets say a user loads the boundaries in the following order. > > 1. State boundary ( index 0 ) > > 2. District boundary ( index 1 ) > > 3. Taluk boundary. ( index 2 ) > > > Then de-selects District boundary, for this case currently I am using > > "overlayMapTypes.removeAt(1)", now Taluk boundary automatically comes > > down to "index 1" from "index 2". Because of this later while trying > > to remove the Taluk boundary using "overlayMapTypes.removeAt(2)" I am > > getting "Error: a is undefined" in Java script console. > > > Is there anyway to hide the layer instead of removing it? > > > I tried "overlayMapTypes.insertAt(idx, null);". No result.
-- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.