Can arcade return the coordinates of a map click?

874
4
08-31-2023 05:42 PM
Trippetoe
Occasional Contributor III

Hello.

My webmap has two polygon layers - a city boundaries layer on top and an annexation layer underneath.  I'm trying to show the specific annexations at a given map click location when just the City layer is visible on the map. And i want to display the annexations in the city boundaries layer popup.

i need the x,y coordinates of the map click in order to intersect with the Annexations layer. Is it possible to use Arcade to get the mouse click coordinates?

I can certainly use the maps default behavior to show the multiple popups of the city boundary layer and the annexation layer. Ideally, though, i'd like to have a single popup on the City layer to show the annexation information.

Thank you

 

0 Kudos
4 Replies
ArmstKP
Occasional Contributor III

@Trippetoe Are you trying to actually write those values to a table or just manually copy the coordinates?

 

0 Kudos
Trippetoe
Occasional Contributor III

I want to use the coordinates to create a point/geometry that i can then use to run an intersection against the Annexation layer. That will enable me to identify any annexations that encompassed that point (maybe thats the wrong word - maybe its 'included' that point). Anyway, looking for annexations that intersected the place where the use clicked the map. Again, i know that the native multiple popups sorta solves the problem for me, but i'd like to present the data for any intersecting annexations in a single popup.

Thank you 

0 Kudos
ArmstKP
Occasional Contributor III
0 Kudos
Trippetoe
Occasional Contributor III

Thanks for your fast reply. Yes, i had seen that link. I was hopeful/wishing that with the updates to Arcade over the past year or so that the functionality had been added in, or some intrepid developer had stumbled on a workaround to get the info. 

As an aside, i didn't understand the suggestion made by DragoonHimself to use a point note feature layer. Do you know that was getting at?

0 Kudos