AnsweredAssumed Answered

Remove Layer

Question asked by empeypp on Jan 11, 2012
Latest reply on Jan 11, 2012 by stevel
I have a very simple question. How do I simply remove a layer with a switch function? My below function adds the layer twoYear to the map but doesn't remove the sixMonth.

   switch (layerSwitchValue) {
    case "6Month":
     
    break;
    case "2year":
     map.addLayers([twoYear]);
     map.removeLayers([sixMonth]);
    break;

Outcomes