Skip to main content
Reverted my update as it did not actually resolve my issue.
Source Link
ca0v
  • 3k
  • 3
  • 30
  • 48

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?

UPDATE: This issue is resolved. Refresh support is implemented on DynamicMapServiceLayer so that actually handles every layer type I am interested in (no need to refresh tiles).

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?

UPDATE: This issue is resolved. Refresh support is implemented on DynamicMapServiceLayer so that actually handles every layer type I am interested in (no need to refresh tiles).

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?

added 182 characters in body
Source Link
ca0v
  • 3k
  • 3
  • 30
  • 48

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?

UPDATE: This issue is resolved. Refresh support is implemented on DynamicMapServiceLayer so that actually handles every layer type I am interested in (no need to refresh tiles).

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?

UPDATE: This issue is resolved. Refresh support is implemented on DynamicMapServiceLayer so that actually handles every layer type I am interested in (no need to refresh tiles).

Source Link
ca0v
  • 3k
  • 3
  • 30
  • 48

ArcGIS Javascript API - Refresh

The ArcGIS Javascript API has a nice refresh interface for ArcGISDynamicMapServiceLayer:

    var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer");
    map.addLayer(dynamicMapServiceLayer);
    dynamicMapServiceLayer.setDisableClientCaching(true);

    if (dynamicMapServiceLayer.disableClientCaching) {
        aspect.after(dynamicMapServiceLayer, "onUpdateEnd", function () {
            $.delay(15000, "UpdateDynamicLayer", function () {
                dynamicMapServiceLayer.refresh();
            });
        });
    }

But this is not generalized across the other layer types. Anyone have a solution for refreshing layers of any type?