I am looking to see if it possible to extract data from a feature when we use sketch tool. After I draw a polygon it is selected as a feature what can I write to get the data behind that select feature may be in a grid to show what I have selected and have capability to export to csv.

I tried using "highlight features by geometry" but that only gives polygon and I need other shapes and also need to have multiple features created at a time which was not happening

const sketch = new Sketch({ layer: layer, view: view }); view.ui.add(sketch, "top-right")
  • Where is the data you're trying to get? If I'm reading this correctly, you want to draw a polygon on the map (with the sketch tool), and then use that polygon to query....another layer? What is that other layer?
    – Juffy
    Nov 7, 2019 at 1:47

1 Answer 1


We need you to provide more information about what you are trying to achieve before we can help any further, but what I can understand from your post is that you are trying to get features from a layer behind a certain geometry you draw.

Esri already provides an example for that:


I think you can use that as a base for what you need to do to get the features from a geometry, and If you have any more questions regarding how to extract the data or you get stuck in your own implementation of that example you can open another question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.