Great stuff, Kelly. Thanks!
I actually ended up making it work with something like....(partial code)
function fireEd()
{
map.removeAllLayers();
var myLyrList=document.getElementById("myList");
edLayer = myLyrList.options[myList.selectedIndex].text;
map.addLayer(basemap);
map.addLayers([bldgInteriorFloor1,camerasBasement,doorsBasement,securityBasement,stairsElevBasement]);
}
function initEditor(results) {
if (templatePicker)
{
templatePicker.destroy();
dojo.create("div", {id: "templateDiv"}, "cPane");
}
if (myEditor)
{
myEditor.destroy();
dojo.create("div", {id: "editorDiv"}, "cPane");
}
for (var i=0;results;i++)
{
if (results.layer.name == edLayer)
{
results = [results];
}
}
var templateLayers = dojo.map(results,function(result){
return result.layer;
});