Solved! Go to Solution.
Ian,
In this situation...
on(dom.byId("Button"), "click", function() {
intersectPoints().then(function(results){
var points = results.features;
// Do something with points
});
});
function intersectPoints() {
var pointsQuery = new Query();
pointsQuery.geometry = polygonSketchViewModel.graphic.geometry.extent;
pointsQuery.outFields = ["*"];
pointsQuery.spatialRelationship = "intersects";
var points = layers.findSublayerById(5);
return points.queryFeatures(pointsQuery)
}
Ian,
In this situation...
on(dom.byId("Button"), "click", function() {
intersectPoints().then(function(results){
var points = results.features;
// Do something with points
});
});
function intersectPoints() {
var pointsQuery = new Query();
pointsQuery.geometry = polygonSketchViewModel.graphic.geometry.extent;
pointsQuery.outFields = ["*"];
pointsQuery.spatialRelationship = "intersects";
var points = layers.findSublayerById(5);
return points.queryFeatures(pointsQuery)
}