Hi Users,
I am using an existing example to perform a query when I am drawing a polygon and it will give me the count of all the features inside it.
Mentioned below is the code.
function initSelectToolbar (event) {
selectionToolbar = new Draw(event.map);
var selectQuery = new Query();
on(selectionToolbar, "DrawEnd", function (geometry) {
selectionToolbar.deactivate();
selectQuery.geometry = geometry;
DREAM_2D .selectFeatures(selectQuery,
FeatureLayer.SELECTION_NEW);
});
}
function sumGasProduction (event) {
var countOfFeatures = 0;
arrayUtil.forEach(event.features, function (feature) {
countOfFeatures++;
});
dom.byId('messages').innerHTML = "<b>Number of points selected: " +
countOfFeatures + " wells. </b>";
}
But after getting the count I need to get the details of each and every point which got selected during the query.
Can someone please help me to resolve it.
Thanks