The AGOL map viewer allows you to right click, see a context menu with "What's Here", reverse geocode the location, and display results in the popup.
How do you mimic this with the javascript api 4.28?
I believe the event click and the reverse-geocode docs should get most of the way. I'm not sure about the context menu. The closest thing for 4.x I could find is the ButtonMenuViewModel. There are no samples available for usage.
There is also a sample from 3.x that does similar functionality.
https://developers.arcgis.com/javascript/3/jssamples/graphics_contextmenu.html
Thank you!
Solved! Go to Solution.
Hi @DavinShokes1 -
Here's an example on how this could be implemented with a button in the view (based off the Intro to popups sample ) :https://codepen.io/laurenb14/pen/QWoRRpj?editors=1000
The workflow goes something like this:
You can always implement some sort of clickable tooltip to display at the clicked location as well.
Hope this helps!
Hi @DavinShokes1 -
Here's an example on how this could be implemented with a button in the view (based off the Intro to popups sample ) :https://codepen.io/laurenb14/pen/QWoRRpj?editors=1000
The workflow goes something like this:
You can always implement some sort of clickable tooltip to display at the clicked location as well.
Hope this helps!