I am working on a viewshed viewer application that uses ArcGIS' Viewshed Analysis example as a base. I have a calculator widget that takes coordinates and zooms to the specified location on the map when a submit button is pressed. The viewshed should then be calculated at that location. The SceneView has an event listener:

view.on("click", computeViewshed);

How do I simulate an "artificial" click using ArcGIS' API?

1 Answer 1


Instead of simulating an artificial click, extract the code that does the analysis to a separate function that takes in a Point (latitude/longitude) as a parameter. Then call that function on SceneView click and when the submit button is pressed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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