Exand tree nodes to liveMapwidget

1848
11
04-19-2012 07:01 AM
RashaGarfinkel
New Contributor
I am trying to add the name of the features under each of the feature layer names - make the tree one level deeper & the features should be selected based on their map visibility - How do I get the features from the feature layer & add them as items to the tree?
0 Kudos
11 Replies
JeffPace
MVP Alum
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) {
}


do you see the query (as a GET or POST) in firebug?
0 Kudos
RashaGarfinkel
New Contributor
do you see the query (as a GET or POST) in firebug?


I must have had something wrong in the query but it seems to be working now - I get back the featureset for the layer - how do I add it as a child to the layer node on the tree - can it be called synchronously - since I want to be able to loop through each layer & query its features?
0 Kudos