Hi Nora,
Hopefully not too late. I've done something similar with checkboxes,
where the user can turn KML layers on and off. I'm using Network
links. The process is something like this:
I have a multi-dimensional array which contains all of my KML layers,
looking like this:
this_array =
['UNIQUE_ID1', ge.createNetworkLink("");, <KML LINK HERE>", "Human
text"], .....
['UNIQUE_ID2', ge.createNetworkLink("");, <KML LINK HERE>", "Human
text"];
For you as you're using a radio button, you'd want something like this
maybe:
function radioclick(UNIQUE_ID);
//turn off all layers - not the most efficient way, but it
should work. :-)
for(var i = 0; i < this_array.length; i++) {
removeNetworkLinks(this_array[i][1]);
}
//create the new layer as specified by the unique_ID
createNetworkLink(this_array[UNIQUE_ID][1], this_array
[UNIQUE_ID][2]);
}
Jonathan