//

203
1
Jump to solution
10-11-2018 06:06 PM
_____
by
New Member
 
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

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)
}

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Esteemed Contributor

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)
}

View solution in original post