Thanks Jason, that works for some situations. But I have a problem; There are some specific situations where toggling a single checkbox needs to show/hide more than one layer (because there are a few situations where an individual object like a muscle actually has to be made from two layers so that a third layer can travel between them to make it look diagramatically correct).
Any ideas how I might apply this? It would be so great if a show() hide() feature were added. I realise keeping the API lightweight is a major consideration in V3, but I suspect at the level this would be implemented, any developer would be well aware of the need to keep things light and tidy. On Jul 21, 7:23 pm, Jason Sanford <jasonsanf...@gmail.com> wrote: > 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-... > > 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-...>Probably > not the most elegant solution, but it seems to work. > > > > On Wed, Jul 21, 2010 at 8:47 AM, Kesuke <nick_dai...@hotmail.com> 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 > > google-maps-js-api...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-maps-js-api-v3+unsubscr...@googlegroups.com<google-maps-js-api-v3%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Hide quoted > >text - > > - Show quoted text - -- 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...@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.