HOW TO

Enable layer toggle in an embedded ArcGIS Online web map

Last Published: April 25, 2020

Summary

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.

Procedure

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.

Article ID:000022712

Software:
  • ArcGIS Online

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic