Starting the 3D Viewer App with custom viewpoint (similar to a scene &viewpoint=cam:<coordinates>)

625
4
Jump to solution
02-22-2023 02:39 AM
Labels (1)
Pål_Herman_Sund
Occasional Contributor II

Hi

with a Scene one can provide the "&viewpoint=cam:<coordinates> " as a URL parameter to have a custom viewpoint. Is it possible to build similar URL for starting the 3D Viewer App with a custom Viewpoint? 

best
Pål Herman

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

I ran a quick test with a local scene and it worked for me. Perhaps its something with your local scene. If its public can you send me the link and I can take a look? 

 

https://jsapi.maps.arcgis.com/apps/instant/3dviewer/index.html?appid=93730225fcb54e658851159cda059a7...

View solution in original post

0 Kudos
4 Replies
KellyHutchins
Esri Frequent Contributor

Yes you can use a custom viewpoint via url param to load the app at a particular viewpoint. Here's an example: 

 

https://www.arcgis.com/apps/instant/3dviewer/index.html?appid=4e8c21a7013c454caf04a99369e481fd&viewp...

 

An easy way to generate the url is to use the share tool in the upper right corner of the app. If you set pan/zoom/rotate to get the map the way you want it then click the Share > Copy Link it will copy a link to the clipboard with the custom viewpoint. 

0 Kudos
Pål_Herman_Sund
Occasional Contributor II

Thanks @KellyHutchins I did notice that text in the documentation, maybe I am troubling but I can only get that "viewpoint-thing" to function when the underlying scene is a global one. 

0 Kudos
KellyHutchins
Esri Frequent Contributor

I ran a quick test with a local scene and it worked for me. Perhaps its something with your local scene. If its public can you send me the link and I can take a look? 

 

https://jsapi.maps.arcgis.com/apps/instant/3dviewer/index.html?appid=93730225fcb54e658851159cda059a7...

0 Kudos
Pål_Herman_Sund
Occasional Contributor II

Thanks again @KellyHutchins I was of course working in a scene with EPSG:25833 refsys and have to add the EPSG code into the URL parameters. Can not share the scene but these parameters are fine:

&viewpoint=cam:-30000,6733000,400,25833;0,90 (being X,Y,Z,EPSG code, direction/azimuth, camera angle)

Many thanks for prompt reply's - much appreciated 🙂

best

Pål Herman/pH 

0 Kudos