do you see the query (as a GET or POST) in firebug?
I had tried queryTask - I am not even getting into the call back - not sure what is wrong with my query - here it is:getFeatures: function(){ var queryTask = new esri.tasks.QueryTask(sublayeritem.url); var queryP = new esri.tasks.Query(); queryP.returnGeometry = true; queryP.outFields = ["*"]; queryP.outSpatialReference = this.map.spatialReference; queryTask.execute(queryP, dojo.hitch(this, "resultCallback"));},resultCallback: function(featureSet) {}
Dynamic map service layers consist of single image created on the fly as requested by a client. If you want info about features, you have to make a request to the server. The easiest way to do this is with a queryTask.
Its saying that its a esri.layers.ArcGISDynamicMapServiceLayer - would you know how I can accesss its features
Check the layer's declaredClass property. If it's esri.layers.GraphicsLayer or esri.layers.FeatureLayer then you can access the layer's features via layer.graphics.
I was using that widget thinking that it is known since I am new to this - its a UI tree that displays maplayers & feature layers based on their visibility on the map so to rephrase my question if I have code to get the layers from the map:for(var i = this.map.layerIds.length - 1; i >= 0; i--){ var layerId = this.map.layerIds; var layer = this.map.getLayer(layerId);}how would I get the inidividual features of the given layer?
I should have been more specific...we don't have anything in the API called a "liveMapWidget". Where did the liveMapWidget come from? Who wrote it? You're best bet is to reach out to the developer of the widget.
It's one of the widgets that displays a tree like structure of layer name & feature layer name - basically I want to add the name of the visible idividual features under the feature layer name listso far I loop through the layers & when I get a sublayer(featrue layer) I try doing the IdentifyTask to get the features but none come back?
What is the "liveMapWidget"?
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.