Question

ArcGIS ESRI javascript API TOC working for all the type of layer. But, TitledMapService not working properly, its does not give the checkbox for this type of map servcie. Difference between both two give below. how fix it?

Was it helpful?

Solution

You've posted the same image twice, but I think I know what you are getting at. You mean an ArcGISTiledMapService and that there is only a single checkbox to turn the layer on/off and that it can't be expanded to show sub layers and turn them on/off as you can with a dynamic layer. This is actually by design.

A tiled layer uses a set of cached tiles to render the layer. The tiles are created and cached on the server, allowing it to quickly return the same set of tiles for all users of the service. That means that you can't choose different sub layers to be on or off - the cache represents a single view of the map service that is shared by all users of it.

If you want to ability to inspect or turn on/off sub layers, access a service as an ArcGISDynamicMapService.

Hope this helps,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top