Turning layers on and off in ArcGIS.com embeddable web map

4307
12
12-08-2011 02:36 AM
MikeSteven
New Contributor III
Hi,

On our website I want to embed a web map I've created with ArcGIS.com but I want the web map to have a table of contents that allows the user to turn on and off all of the layers in the map. Is it possible to turn layers on and off on the embedded web map? Are there any templates for it (I can't find one)?

Thanks,
Mike.
Tags (2)
0 Kudos
12 Replies
MikeMinami
Esri Notable Contributor
The basic viewer allows you to turn layers on and off. It doesn't display a table of contents, but there is a dropdown menu option that shows a list of layers.

Mike
0 Kudos
MikeSteven
New Contributor III
Thansk for your reply Mike. Yeah I've seen that but I was aiming to embed the map in an iframe on our website without using the basic map viewer. Also I want each of the 10/11 layers in the map to be able to be turned on or off, without having to put each layer in it's own ArcGIS Server map service.

I know I can do this with the javascript API, I was just looking for a quicker way with ArcGIS.com, I guess there isn't one?
0 Kudos
MikeMinami
Esri Notable Contributor
I know I can do this with the javascript API, I was just looking for a quicker way with ArcGIS.com, I guess there isn't one?


Not that I'm aware of...

Mike
0 Kudos
SargentMcDonald
New Contributor III
Mike,
Any plans on fixing this issue? I love the ease of the arcgis.com basic viewer but I have some serious map service bloat on my Server since I have to create a separate service for each layer instead of each mxd to get the individual layers to show up in the template. A simple mxd with 3 layers becomes 3 separate map services to create and manage in order to use the template layers option.
0 Kudos
BretWhiteley1
New Contributor
I am looking to do the same thing - has this been functionality been updated as a possibility in the 2 years since this thread was originally posted?
0 Kudos
SargentMcDonald
New Contributor III
I have been adding the layers from the map service by their rest index number url and that works fine.
Example , /mapservicename/mapserver/3

It takes a few extra minutes but works to get the layers to work in the templates and you don't need separate map services for each layer like I thought back then.
It is a pain when you reorder or add layers to the map service as the agol map needs to be redone too.
0 Kudos
RaymondChetti
New Contributor III
I am looking to do the same thing. I cannot allow viewers of my embeddable map turn on and off layers.

I have Population as one layer and Income as the other. I want users to be able to toggle on and off between the two, but there is no way they can do that with my embedded map.
0 Kudos
SargentMcDonald
New Contributor III
I have been using the above thread post and adding the layers per rest url endpoint.

"I have been adding the layers from the map service by their rest index number url and that works fine.
Example , /mapservicename/mapserver/3"
0 Kudos
RaymondChetti
New Contributor III
I have been using the above thread post and adding the layers per rest url endpoint.

"I have been adding the layers from the map service by their rest index number url and that works fine.
Example , /mapservicename/mapserver/3"


I'm afraid I am not exactly sure what you may mean? How would one go about doing this?
0 Kudos