Skip To Content

在场景中使用 URL 参数

定义视点

要在 URL 中定义视点,请使用 &viewpoint=cam:<coordinates> 参数。

在本例中,&viewpoint=cam:<coordinates> 参数可打开位于德国汉堡的内阿尔斯特湖坐标处的场景项目 b04e44630e4d4f788b4fec3f2d8c9ace

https://myportal.domain.com/portal/home/webscene/viewer.html?webscene=b04e44630e4d4f788b4fec3f2d8c9ace&viewpoint=cam:9.98717314,53.54101423,847.391;23.206,65.41
注:

如果您没有场景中视点的坐标,可以通过单击共享按钮 共享,取消选中短链接框并复制链接的方式获取坐标。

打开幻灯片

要将场景打开至特定幻灯片,可添加 #<slide-number> 参数。

在本例中,#3 参数将场景项目 6c7a0d4f03d2444fb1f4fa9e85a96044 打开至奥地利林茨的幻灯片 Hafenviertel,即场景中的第三张幻灯片。

https://myportal.domain.com/portal/home/webscene/viewer.html?webscene=6c7a0d4f03d2444fb1f4fa9e85a96044#3

通过 URL 打开服务

对于要在场景中直接打开的服务,如果您有服务的 URL,请使用 ?url=<service> 参数。

在本例中,?url=<service> 参数可打开一个加载俄勒冈州波特兰市建筑物服务的场景:

https://myportal.domain.com/portal/home/webscene/viewer.html?url=https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Portland/SceneServer

嵌入最小 Scene Viewer UI

当您想在第三方应用程序中嵌入场景时,可能需要最小 Scene Viewer UI,以防 Web 页面过于复杂。 为此,添加 &ui=min 参数。

在本例中,&ui=min 参数可在 Scene Viewer 中打开使用最小 UI 的加拿大温哥华的场景:

https://myportal.domain.com/portal/home/webscene/viewer.html?webscene=c7da180e4ca4414caa923d2e2724eb5c&ui=min

使用多个参数

要包含多个参数,请使用“与”号 (&) 分隔参数。

在本例中,& 字符可分隔 url=viewpoint=cam: 参数:

https://myportal.domain.com/portal/home/webscene/viewer.html?url=https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Portland/SceneServer&viewpoint=cam:-122.67434468,45.51190967,318.448;3.757,74.342