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: ["*"] });
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/MapServerAnd 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
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.