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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.