map click event INFO

176
1
02-07-2023 08:58 AM
DimaY
by
New Contributor

Hi all!
Sorry if the topic has already been. Please help me, is it possible to click on the map view event, find out all the information about which polygon it is? If earlier these polygons were added dynamically as graphics to the view map.

Thanks!

0 Kudos
1 Reply
UndralBatsukh
Esri Regular Contributor

You can do this by taking advantage of MapVIew.hittest method. The doc has good explanation and code snippets. This sample shows how to use hittest  https://developers.arcgis.com/javascript/latest/sample-code/view-hittest/

 

0 Kudos