Nope. There's only setMap.

I mean, you could use stroke/fillOpacity but that'd be quite a bit slower.

How many polygons do you have? Have you got a link to your map?

Are they dynamic? Have you considered using Fusion Tables or KML to render
them?

On Tue, Jun 14, 2011 at 6:24 PM, Sammy <[email protected]> wrote:

> Hi all, is there a way to toggle visibility of polygons, besides
> setMap()?
> I'm asking this because with the code below, it takes in IE about 10
> seconds to show the polygons, 1 second to hide them. In Mozilla, it
> takes only 1 second to show them.
> When I created the polys (30 pcs, provinces of Indonesia) I stored
> them in a public array so that I can access them. I'm using the
> ActiveX MS WebBrowser, so I can't use Mozilla for this purpose.
> Thank you for advice.
>
>        if (oObjVisible.provinces === false) {lVisible = null;}
>        else {
>                lVisible = map;
>                if (map.getZoom() > 5) {map.setZoom(5);}        // when
> showing polys, make
> sure zoom is small enough...
>        }
>        oObjVisible.provinces = !oObjVisible.provinces  // toggle flag...
>
>        for (var i=0 ; i< gaProvArray.length ; i++)     {
>                gaProvArray[i].setMap(lVisible);
>        }
>
> --
> 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
> [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-js-api-v3?hl=en.
>
>


-- 
http://twitter.com/broady

-- 
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 [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-js-api-v3?hl=en.

Reply via email to