Select to view content in your preferred language

How do i get the coordinates of a point in a 3D webscene with the Javascript Api?

611
1
10-17-2022 06:35 AM
RubenJanßen
New Contributor

I am currently working with the the ArcGIS API for JavaScript. I dived into the ArcGIS API for JavaScript currently for just two weeks now , so I am not that familiar with it.

Is there any way to get the coordinates of a point from a 3D webscene by clicking at a random point on the scene? Or is there atleast a way to get the coordinates of a selected feature?

Tags (2)
0 Kudos
1 Reply
SaschaBrunnerCH
Esri Contributor

Hi and welcome to the 3D world with the ArcGIS API for Javascript.

You can get the information with SceneView-hitTest . The SceneView-HitTestResult gives you back the ground hit with coordinates. Check out the sample SceneView - hitTest to see how it works.