Is it possible to create a web map service in ArcGIS Server 10.2 that is both a tile cache and dynamic? I want the service to use a tile cache down to a specified scale, then switch to drawing the layer dynamically below that scale. I could have sworn ArcServer was able to do this, but I don't see anyway in the help or when creating a service. Is this possible?
The only trick I know is to create two map services, one tiled and one dynamic.
Then when you load them into any client just set the scale max/min so the tiled map
service will be visible in the high scales and the dynamic will be visible in
the low scales.
If there is any other trick I will be happy to know about it.
Yes, you can do that starting with 10.1.
Few things you need to do:
you need to do is enable dynamic-layers capabilities for that cached map service.
- When an "export" call comes to a cached map service (with dynamic layers capabilities enabled), it behaves as if it were a dynamic map service (does not use cached tiles at all).
Web Application Side:
In order to use that you in your web app, you need to the following:
what will happen is that when the ArcGISDynamicMapServiceLayer is drawn, the app will sends an export call (instead of asking for tiles) with dynamicLayers and the cached map service will fetches features from the database, draws them and export an image which gets drawn on the app.
hope this will help.
I believe what Tanu is saying is that when you load your layer with the ArcGISDynamicMapServiceLayer class you should use its dynamiclayerinfos collection to set when the layer becomes visible and not.
So your dynamic layer will stay visible until you reach your threshold, where it will turn off and the cached one will turn on.
It's the same thing you do in ArcMap when you set the levels where the layer becomes visible and not.
Sorry somehow i missed the notification from this thread...
i need to double check, but I think 'use dynamicLayerInfo' is optional. as long as you add the same cached map service twice - as 'a dynamic map service layer' and a 'titled map service layer', and then set the layer scale-visibility-range correctly, you should be all good.
BTW, you guys must have realized that this works only when you have your custom application. it does not work (as far as I know) with ArcGIS Online and portal map viewer.
pls let me know if you have any question.