3D center

399
1
09-29-2022 07:55 AM
NorbertByiringiro
New Contributor II

Hello, 

Is it possible to set the view center of the  3D environment  with the z value(elevation)? 

i.e: center:(x,y,z) 

 

Thanks for your help.

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hey @NorbertByiringiro 

Yes you can, see the documentation here: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#center

But currently the functionality using view.center() with z-values does not always work as intended, there are some known issues. An alternative would be using view.camera(), documentation can be found here: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#camera. With the camera property you also get more options on where the camera should look (heading and tilt). Also check out the sample here: https://developers.arcgis.com/javascript/latest/sample-code/scene-easy-navigate/.

I hope this helps your issue, if not do not hesitate to ask again!

Best, Daniel

0 Kudos