Hi mike, Your problem appears to be that you are overloading the use of show_kml to mean three different things. Here's the sequence of events that you describe:
1. I click the blue toggle button. show_kml was 1, so it is now set to 0 and I hide the blue layer. 2. I click the pink toggle button. You would expect show_kml to be 1 (since the pink layer is visible) but because you share it among all three layers, it's actually just been set to 0 by the blue layer. So I re-add the pink layer (even though it was already there) and set show_kml to 1. 2. I click the pink toggle button again. show_kml is 1 so the layer is hidden and show_kml is set to 0. What you want is three different variables: show_stone, show_tile, show_wood INSTEAD of show_kml, so that each layer has its own state which isn't interfered with by other layers. Regards, James On Fri, Feb 11, 2011 at 7:20 AM, Joseph Elfelt <[email protected]> wrote: > Thanks for clarifying. I see what you mean. > > I noticed that when I toggle anything then the markers in the other > files seem to refresh on the map. > That needless refresh strikes me as odd and I wonder if it is related > to the need to click the button more than once. > > -- > 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. > > -- 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.
