Legend Visibility in Embedded Web Map

2659
2
Jump to solution
03-12-2014 01:34 PM
JohnNerge
New Contributor III
Is it possible to have the Legend turned on by default in an embedded web map? I know that the Basic Viewer app, which uses the index.html, has a "leftPanelVisibilty: true" setting; does something like this exist for the embed.html version of the Basic Viewer?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JohnNerge
New Contributor III
Esri Support found a solution. You can publish the basic viewer app and embed it instead of the web map.

Here's a sample from our city website. Originally we embedded the web map using this iframe code:
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://brooklynpark.maps.arcgis.com/home/webmap/templates/OnePane/basicviewer/embed.html?webmap=c205..."></iframe>

Notice how the src piece of the code is already using the basic viewer using the embed.html version.

We replaced it with this iframe code, which URL to the published Basic Viewer web app instead:
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://brooklynpark.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=aa72aa2ab27a41fc9ee920..."></iframe>

The end result is that the embedded map displayed the Legend by default (along with any other configuration we want to do on the basic viewer app). The trick to making it fit nicely in the iframe is to turn off the Title when configuring the app.

View solution in original post

0 Kudos
2 Replies
JohnNerge
New Contributor III
Esri Support found a solution. You can publish the basic viewer app and embed it instead of the web map.

Here's a sample from our city website. Originally we embedded the web map using this iframe code:
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://brooklynpark.maps.arcgis.com/home/webmap/templates/OnePane/basicviewer/embed.html?webmap=c205..."></iframe>

Notice how the src piece of the code is already using the basic viewer using the embed.html version.

We replaced it with this iframe code, which URL to the published Basic Viewer web app instead:
<iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://brooklynpark.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=aa72aa2ab27a41fc9ee920..."></iframe>

The end result is that the embedded map displayed the Legend by default (along with any other configuration we want to do on the basic viewer app). The trick to making it fit nicely in the iframe is to turn off the Title when configuring the app.
0 Kudos
ChadJohnsonGISP
New Contributor

Just add this in embed code 

After-  "legend=true"

Add - "&show_panel=true"

0 Kudos