操作方法

操作方法:在嵌入式 ArcGIS Online web 地图中启用图层切换

Last Published: October 1, 2025

摘要

ArcGIS Online web maps can be featured and shared by embedding them in an organization website or other web pages. Using the 'Embed in Website' option, it is possible to configure the embedded web map with the layer toggle functionality enabled.

过程

To enable layer toggle in an embedded ArcGIS Online web map, configure the embedded view of the web map using the embed URL with the layer toggle functionality enabled. To obtain the embed URL, complete the steps below:

  1. In the Embed in Website window, click the Map Options tab. Check the Legend and Layer Toggle check boxes.
Embed in Website window.
  1. Copy the URL in the double quote between src= and <i/frame> in the Copy and paste HTML to embed in website. section, and paste it onto the web page.
<style>.embed-container {position: relative; padding-bottom: 80%; height: 0; max-width: 100%;} .embed-container iframe, .embed-container object, .embed-container iframe{position: absolute; top: 0; left: 0; width: 100%; height: 100%;} small{position: absolute; z-index: 40; bottom: 0; margin-bottom: -15px;}</style><div class="embed-container"><iframe width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" title="22712" 
src="<Copy_this_URL>"</iframe>

The image below shows the embedded web map configured with the layer toggle option enabled in the legend.

Embedded map with the layer toggle option enabled.

文章 ID: 000022712

获得人工智能支持

使用 Esri Support AI Chatbot 快速解决您的问题。

立即开始聊天

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

立即开始聊天

转至下载选项