I had a similar problem and posted about how I dealt with it here:
http://geojason.info/2010/05/overlay-map-management-with-google-maps-api-v3/

Basically what I'm doing is inserting a null value for every overlay I plan
on adding to the map into the map.overlayMapTypes array and then creating a
new imageMapType when a check box is clicked.

<http://geojason.info/2010/05/overlay-map-management-with-google-maps-api-v3/>Probably
not the most elegant solution, but it seems to work.


On Wed, Jul 21, 2010 at 8:47 AM, Kesuke <[email protected]> wrote:

> Thanks for the suggestions, however I'm having two major problems with
> this approach;
>
> 1.) It works the first time its clicked, but I think its trying to
> insertAt or removeAt where objects have already been removed. I'm
> wondering if when an element is 'removeAt', everything moves down the
> MCV array. e.g. index 3 becomes 2.
>
> 2.) Because this involves multiple transparent layers being stacked
> ontop of each other, it leads to unusual z-index issues where layers
> end up in the wrong order. You can see this on the example below when
> you click Pectoralis major twice (to hide, then again to show). It
> will appear behind the intercostal layer.
>
> I've setup a test to show the strange behaviour of this approach at
> http://anatomy.study-medicine.co.uk/testg3t3.html (you can see the
> code changes on line 298)
>
> --
> 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]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

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