Thanks for taking the time to create that Jason, it has been very helpful! I've got it working and now just have two questions;
1.) On your version the overlays are unchecked/not shown by default. Any ideas about how this could be tweaked to have some layers switched on at load. 2.) Linking into the first question - are you aware of any V3 code that could be used to return whether an MCVarray item is null? - if so that could be used to detect 'if (layer X is not null) do....' On Jul 22, 2:49 am, Jason Sanford <jasonsanf...@gmail.com> wrote: > I threw together some code very quickly so it's likely to be buggy but check > out the slightly modified version of the sample I linked to earlier. > > http://demos.geojason.info/anatomy.php > > What I did was add three additional check boxes that have an id with two (or > more) layers instead of one. The ids are separated by commas so that we can > split them apart and add/remove the layer as needed. This might help you? > > The code might be a little confusing if you're not familiar with jQuery but > it's pretty self explanatory. Let me know if I need to explain further. > > > > On Wed, Jul 21, 2010 at 8:28 PM, Kesuke <nick_dai...@hotmail.com> wrote: > > 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<http://anatomy.study-medicine.co.uk/testg3t3.html%28you>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> > > <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<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.