Re: Toggle layers on and off in Web AppBuilder

6972
13
11-10-2015 08:17 AM
StevenDouglas1
New Contributor III

UPDATED: See bottom of this question:

Since this is its own thread now, I'll go ahead and expand...

I am wondering how you get layers within groups to be toggle-able. The MXD was created to house all these layers within a group instead of having to create an mxd and a service for every single layer.

As you can see, when I create a map in web app builder, the layers are still defaulted to on all the time. Whereas, in another thread we were told there would be the ability to have check boxes for each layer within the group. Obviously when they're on all the time it is not useful as there are going to be >100 individual layers.
web_app_bldr_layer_list_screen.jpg

Is that something that needs to be changed first? If so where?

_______________________________________________________________________________________________________________

Ok, so after some experimenting I seem to have realized something. The above screenshot is of raster layers. However, I've now added some polygons and point files and noticed that those are able to be toggled on and off.

Is the answer that shapefiles can be turned on and off within groups, but raster files cannot? If so, whats up with that? In the meantime I've found customized table of content widgets that should fix the problem, but 1) I'm waiting for my server admin to install WebApp builder developer ed. and 2) Why can't ESRI just make this a default? It seems so simple and useful...

Message was edited by: Steven Douglas

0 Kudos
13 Replies
OwenGeo
Esri Notable Contributor

Hi Steven - I split your post off of the rest of the discussion on Story Maps since your question is about Web AppBuilder and I moved it to the Web AppBuilder Place on GeoNet.

Owen

Owen Evans
Lead Product Engineer | StoryMaps
0 Kudos
Jianxia
Esri Regular Contributor

Steven,

Are those layers from ImageServer or MapServer? Can you toggle them in Map Viewer? If possible, can you share sample service for us to take a close look?

Thanks,

Jianxia

0 Kudos
StevenDouglas1
New Contributor III

Thank you for the reply

They are hosted REST services from our server. I cannot toggle them in the map viewer or the web app. Unfortunately I don't think I can share anything since it is not published yet and therefore I don't have the permissions.

0 Kudos
Jianxia
Esri Regular Contributor

From the rest end point, can you tell which type of server it is? A MapServer of ImageServer, something like the links below:

USA (MapServer)

CharlotteLAS (ImageServer)

Thanks,

Jianxia

0 Kudos
StevenDouglas1
New Contributor III

Oh I see what you mean.

They are MapServers.

0 Kudos
StevenDouglas1
New Contributor III

Does that make a difference?

0 Kudos
StevenDouglas1
New Contributor III

Well I think I discovered part of the problem.

I looked at a couple of the layers that were different (both vector polygons), one wasn't giving me this option. It turns out the ones that I cache do not give me the option to toggle each layer on and off. But now when I turn off the caching I can't get anything to display, but I guess thats a different issue...

Is this caching thing something that is known? Why won't it let me turn cached layers on and off?

0 Kudos
Jianxia
Esri Regular Contributor

I cannot tell without looking into the service. Just ran a quick test by publishing mapserver with image layer as sub -layers. lt seems fine. See the screenshot.

Jianxia

0 Kudos
XiaodongWang
Esri Contributor

Only dynamic map service has ability to turn each sublayer on and off. Tiled map service layer does not have the ability to toggle each sublayer on and off, that is limited by service capability.

0 Kudos