wang,
I have similar kind of problem with my tiled map service, when i upload to arcmap it doesn't allow me to take sublayer turn on and off, how it can be possible. Is there any setting or tools available with new version of Arcgis 10.2 server and desktop 10.2?.
how could I resolve this issue of making sublayer turn on and off with tiled map service?
Thanks,
Amit
Hi Amit,
Actually you cant do that for TiledLayer and here is why.
When you create a Cached layer or TiledLayer on ArcServer what happened is that ArcServer create small tiles for the map on all available scales and every where. which means thousands of small tiles. And they already created and saved on the server as they was created on ArcMap before turning them in to TiledLayer.
And all what your app do is requesting this small tiles as it is form ArcServer to show them on a Grid as it come to the end to be the map.
You can change the visibility of the sublayers of a DynamicLayer because the DynamicLayer works in different way, your app sends a request to ArcServer requesting a view for a specific extent which is your current location on the map and with some properties like which layers to be visible or not. Then ArcServer creates a new image view for that location with this properties and send it back to your app.
That is why TiledLayers are faster in rendering and DynamicLayers slower but have more dynamic in using it.
Hope that helps you in knowing how they works and what you can do and what you cant.
To achieve what you want you can use DynamicMapService instead of the Tiled one. or create and add a TiledLayer as base map with out the sublayers and add the sublayers separately to the map and you will be able to control them as you want in hiding or showing them.
Thanks,
Asser
Thanks Asser,
I got your point. thanks once again for your nice explanation.
Amit