AnsweredAssumed Answered

how to Get all selected features Ids  from a buffer results

Question asked by hamad2 on Aug 11, 2016
Latest reply on Aug 11, 2016 by hamad2

Is it Possible to get prop_id  for each  Parcels   selected in a buffer results,  so I can pass them to  SQL query,  for example  if the buffer return  10  parcels  I need to get all the prop_id for the 10 parcels..

_showBuffer: function(features){
            $('.results.multipleBuffer').hide();
            var bufferSymbol = symbols.buffer;
            map.graphics.clear();
            if (features.length > 0) {
                var graphic = new Graphic(features[0], bufferSymbol);
                map.graphics.add(graphic);
                queryTask = new QueryTask(config.mapServices.dynamic + "/" + config.parcelLayerID);
                var bufferQuery = new Query();
                bufferQuery.outFields = ["*"];
                bufferQuery.returnGeometry = true;
                bufferQuery.geometry = features[0];
                queryTask.execute(bufferQuery).then(lang.hitch( this, function (fset) {
                    var bufferFeatures = fset.features;
                    console.log(bufferFeatures);
                    this._createTable(bufferFeatures);
                    //console.log(bufferFeatures);
                    navEvent('point');
                    if (fset.features.length > 0) {
                        var allGraphics = array.map(fset.features, function (feature) {
                            return feature;
                        });
                        unionExtent = graphicsUtils.graphicsExtent(allGraphics);
                        map.setExtent(unionExtent.expand(1.5));
                    }
                }));
            }
        },

Outcomes