How can I get the click on a polygon that was drawn using Sketch Widget? I tried hitTest, but it brings several results (points and polygons)
Currently my code looks like this:
view.on("click", function (event) {
view.hitTest(event.screenPoint).then(function (response) {
console.log(response.results); //results an array of geometrys
});
});