ArcGIS Online

Use URL parameters in Scene Viewer

URL parameters can be used to pass along additional information or instructions to Scene Viewer, controlling the scenes that are opened, their zoom level, slide visibility, and more.

URL parameters follow a question mark (?) and are made of a key-value pair connected with an equal sign (=). For example, Scene Viewer takes the ID of the scene to open as a URL parameter.

Scene Viewer URL parameters

To include multiple parameters, separate them with an ampersand (&).

Scene Viewer URL parameters

 

URL encoding

URL encoding replaces characters with the percent sign (%) followed by their hex (hexadecimal) equivalent. In modern browsers, URL encoding is automatically added as needed when entering a URL in the browser address bar. When using embedded scenes, encoding may be necessary.

For example, the following is an example that opens a scene at a specific view point.

https://www.arcgis.com/home/webscene/viewer.html?webscene=12f2c243d6a346beaee9702d96c19e7c
&viewpoint=cam:-77.05512164,38.88782165,114.032;80.435,83.892

The full URL encoding is as follows:

https%3A%2F%2Fwww.arcgis.com%2Fhome%2Fwebscene%2Fviewer.html
%3Fwebscene%3D12f2c243d6a346beaee9702d96c19e7c%26viewpoint%3Dcam%3A-77.05512164%2C38.88782165%2C114.032%3B80.435%2C83.892

For more information, and to encode your URL strings, see URLEncoder.io

 

Examples

The following examples show using URL parameters to open and modify scenes.

Open an existing scene as configured

The scene is referenced by its ID, 12f2c243d6a346beaee9702d96c19e7c.

https://www.arcgis.com/home/webscene/viewer.html?webscene=12f2c243d6a346beaee9702d96c19e7c

Open an existing scene and minimize the UI

To minimize the UI, use &ui=min.

https://www.arcgis.com/home/webscene/viewer.html?webscene=12f2c243d6a346beaee9702d96c19e7c&ui=min

Open an existing scene to a specific slide

Slides show different views of a scene and capture the view state. The slides can have different basemaps, layer visibility, daylight settings, weather effects, and extents. For more information, see Capture slides.

To open to a specific slide, use # followed by the slide number.

https://www.arcgis.com/home/webscene/viewer.html?webscene=12f2c243d6a346beaee9702d96c19e7c#3

Open an existing scene at a specific viewpoint

A scene viewpoint describes the location, zoom level, and view angle. Viewpoints are specified using &viewpoint=cam: and then providing the cam coordinates.

https://www.arcgis.com/home/webscene/viewer.html?webscene=12f2c243d6a346beaee9702d96c19e7c
&viewpoint=cam:2.34543465,48.85194268,171.759;66.969,70.597

Tip: To capture a viewpoint, click Share to copy the short link. To obtain the viewpoint cam coordinates (which you can combine with other scenes and URL parameters), follow these steps.

Step 1 – Open a scene and navigate to a location at the desired viewpoint.

Step 2 – Click Share from the toolbar.

Step 3 – Uncheck Short link.

Step 4 – Copy the link.

Copy link

Add layers to Scene Viewer using the layer ID

You can add layers using the layer ID. To add multiple layers, use commas.

The following example adds a historical map to the scene.

https://www.arcgis.com/home/webscene/viewer.html?layers=e38128e2526741d3b035a5e359d1f0bc

This example adds Recent Earthquakes and Recent Hurricanes, Cyclones, and Typhoons from ArcGIS Living Atlas to the scene.

https://www.arcgis.com/home/webscene/viewer.html
?layers=9e2f2b544c954fda9cd13b7f3e6eebce,adfe292a67f8471a9d8230ef93294414

This example adds a layer and adjusts the viewpoint. The viewpoint was obtained using the Share link discussed above.

https://www.arcgis.com/home/webscene/viewer.html?layers=dfc65d5eba804f289f1c45ec0628c5ee&viewpoint=cam:114.17729402,22.29250748,230.259;203.431,85.833

Scene

Add a layer to scene viewer by URL

In addition to adding layers using ID, you can add layers using a URL.

https://www.arcgis.com/home/webscene/viewer.html
?url=https://earthlive.maptiles.arcgis.com/arcgis/rest/services/GOES/GOES31C/MapServer

 

More information

For more information, see:

 

About the author

Corporate technology evangelist and advocate at Esri, focusing on ways to broaden access to geographic information and helping customers succeed with the ArcGIS system. On a good day I'm making a map, on a great day I'm on one. Email bszukalski@esri.com or connect on LinkedIn (https://www.linkedin.com/in/bernszukalski/).

Connect:

Next Article

Preparing for Lead and Copper Rule Improvements

Read this article