Hello!
I seem to be having issues selecting Features when drawing a Graphic? I have a button click that adds a rectangle GraphicsLayer from the SketchViewModel, but not sure how to get the Geometry of the rectangle to select or query the Features that intersect?
The online examples seem overly complex just for a Geometry intersection?
here is the graphics section that works-
const graphicsrectangleselectLayer = new GraphicsLayer({
id: "tempGraphics"
});
var drawRectangle = document.getElementById("rectangleselectButton");
drawRectangle.onclick = function () {
sketchViewModelrectangle.create("rectangle"); //polygon
};
const sketchViewModelrectangle = new SketchViewModel({
view: view,
layer: graphicsrectangleselectLayer,
});
Just need the Geometry/Query/Intersect part? any help would be appreciated.