AnsweredAssumed Answered

Remove layer from application and TOC

Question asked by ho0mwp on Oct 3, 2014
Latest reply on Oct 3, 2014 by rscheitlin

I've created a TOC with a lot of help but in the end what I am doing is creating a layer based on some filters.  So what I want to do is add the layer with the filters and then if someone runs it again it removes the old layer and adds a new layer with the same name but with the new filters.

 

Where I am having problems is removing the layer out of the Table of Contents.  So if you click on my example below and click the get results button twice you will see that my "StoresResultsLayer" is showing twice.  I only want it to show once.  So how do you remove a layer from the TOC?

 

http://jsfiddle.net/bearcatrunner/y4hwhoge/5/embedded/result/

Outcomes