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: ["*"] });
Solved! Go to Solution.
The find task expects the url to the map server instead of to a feature layer. For example if I wanted to use the Find Task I'd supply this url:
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer
And if I wanted to add a feature layer from that map service I'd do something like this where I'd add the index of the layer.
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer/0