AnsweredAssumed Answered

Bringing in a service twice

Question asked by thek04 on Aug 16, 2013
Latest reply on Aug 16, 2013 by thek04
Is there a way to bring a service in twice? I am bringing in my service once as a featurelayer. This is where I do most of the work with my map but I also want to run a FindTask on the same service.

findTask = new esri.tasks.FindTask(wellFeatureLayer);  findTask = new esri.tasks.FindTask("http://services.azgs.az.gov/ArcGIS/rest/services/....");  wellFeatureLayer = new esri.layers.FeatureLayer("http://services.azgs.az.gov/ArcGIS/rest/services/...",{         mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //data on demand         infoTemplate: infoTemplate,         outFields: ["*"]       });


I have tried bringing in the service both ways at the same time and that gives me a domain error. I also tried passing the the wellFeatureLayer  variable to the find task. That just gives me an undefined path error.

Outcomes