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.
To include multiple parameters, separate them with an ampersand (&).
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.
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.
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.
This example adds a layer and adjusts the viewpoint. The viewpoint was obtained using the Share link discussed above.
Add a layer to scene viewer by URL
In addition to adding layers using ID, you can add layers using a URL.
More information
For more information, see:
- Use URL parameters in scenes (Help)
- Get started with Scene Viewer (Help)
Commenting is not enabled for this article.