This document is archived and information here might be outdated.  Recommended version.


IDynamicCacheLayerManager.Update Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IDynamicCacheLayerManager.Update Method

Update the cache associated with the layer according to the given extent, between the from-scale to the target-scale and according to the update-mode.

[Visual Basic .NET]
Public Sub Update ( _
    ByVal Extent As IEnvelope, _
    ByVal fromMapScale As Double, _
    ByVal targetMapScale As Double, _
    ByVal UpdateMode As esriMapCacheUpdateMode _
)
[C#]
public void Update (
    IEnvelope Extent,
    double fromMapScale,
    double targetMapScale,
    esriMapCacheUpdateMode UpdateMode
);
[C++]
HRESULT Update(
  IEnvelope* Extent,
  double fromMapScale,
  double targetMapScale,
  esriMapCacheUpdateMode UpdateMode
);
[C++]

Parameters Extent [in]
Extent is a parameter of type IEnvelope* fromMapScale [in]
fromMapScale is a parameter of type double targetMapScale [in]
targetMapScale is a parameter of type double UpdateMode [in]
UpdateMode is a parameter of type esriMapCacheUpdateMode

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Passing a null extent will result in update of the cache for the entire layer extent, according to the layer’s area of interest.

Normally, the values for both fromMapScale and targetMapScale are set to greater than zero. In case of extreme values such as zero or less, the following behaviors are expected:

The updateMode is to replace missing tiles, overwrite outdated tiles, or delete  tiles for a given layer within a given extent and scale reange. There are three modes of operation:

 

[C#]

The following C# code shows how to update the cache associated with the layer, for the entire layer’s area of interest, for all scales up to the current map scale, and updating only missing tiles. It assumes that you already have a valid Map Control. Please note that you must initialize the cache manager with the given map and layer in order to use any methods and properties on IDynamicCacheLayerManager interface.

 

IMap map=axMapControl1.Map;

IDynamicCacheLayerManager dynamicCacheLayerManager=new DynamicCacheLayerManagerClass();

ILayer layer=map.get_Layer(0);

if (layer is IDynamicLayer) {return ;}

dynamicCacheLayerManager.Init(map, layer);

dynamicCacheLayerManager.Update(layer.AreaOfInterest, 0, map.MapScale, esriMapCacheUpdateMode.esriMapCacheUpdateRecreateMissing);

[Visual Basic .NET]

The following code shows how to update the cache associated with the layer, for the entire layer’s area of interest, for all scales up to the current map scale, and updating only missing tiles. It assumes that you already have a valid Map Control. Please note that you must initialize the cache manager with the given map and layer in order to use any methods and properties on IDynamicCacheLayerManager interface.

Dim map As axMapControl1.Map
Dim dynamicCacheLayerManager As IDynamicCacheLayerManager=New DynamicCacheLayerManagerClass()
Dim layer As ILayer=map.Layer(0)
If (TypeOf layer is IDynamicLayer) Then
   Return
End If
dynamicCacheLayerManager.Init(map, layer)
dynamicCacheLayerManager.Update(layer.AreaOfInterest, 0, map.MapScale, esriMapCacheUpdateMode.esriMapCacheUpdateRecreateMissing)

See Also

IDynamicCacheLayerManager Interface

.NET Related Topics

Persisting cache information for use in dynamic display