Thanks!I looked at the layer factory there and it seems to look at the singleFusedMapCache to determine if it is a dynamic or tiled map service: if (response.singleFusedMapCache) { // Create a tile map service layer. require(["esri/layers/agstiled"], function () { var layer; layer = new esri.layers.ArcGISTiledMapServiceLayer(url, layerOptions); self._triggerLayerCreate(layer); /Mathias
if (response.singleFusedMapCache) { // Create a tile map service layer. require(["esri/layers/agstiled"], function () { var layer; layer = new esri.layers.ArcGISTiledMapServiceLayer(url, layerOptions); self._triggerLayerCreate(layer);
This project might be helpful to what you are trying to do.https://github.com/WSDOT-GIS/LayerFactory
I forgot that although they are tiled does not mean it's a fused cache so you can still disabled layers.
Can't test at moment, but I seem to remember serving tiled data as dynamic provided a grainy looking map and serving dynamic as tiled loaded the data in weird tiles that didn't line up correctly.
Like Oren suggested, if you are loading from a configuration of some sort, can't you specify it there?
If not that way, look at the info of the map service using esri/requesthttp://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer?f=pjsonCheck if singleFusedMapCache is true or if it has a tileInfo property.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.