ESRI.ArcGIS.ADF.Web.UI.WebControls | |
Refresh Method | |
See Also Example |
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > Map Class : Refresh Method |
Visual Basic (Declaration) | |
---|---|
Public Overrides Sub Refresh() |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public override void Refresh() |
C# | Copy Code |
---|---|
if (Map1.ImageBlendingMode == |
Visual Basic | Copy Code |
---|---|
If Map1.ImageBlendingMode = _ |
This method refreshes the tiles for all resources (services). You need to refresh the map if you make a change to it, such as changing layer visibility or adding graphics to the map.
If you have only one resource (service) in the Map, this method has the same effect as RefreshResource for that resource.
When your map has multiple resources
If the MapResourceManager associated with your Map has more than one resource (service), it can often be more efficient to use RefreshResource to refresh an individual resource, rather than to use Refresh. If you make a change to just one resource, you can refresh just that resource. This may save considerable time and resources on both server and browser.
This applies also when using GraphicLayers in the Map/MapResourceManager. For example, if you create a custom tool that adds graphics to the Map, you can add the graphics to the GraphicsLayer resource, and then refresh just that resource. The background map need not be refreshed at that point.
Of course, if you make a change that affects all resources, you should do a full Refresh. For example, if you set the Map.Extent so that the scale changes, the browser must retrieve new tiles for all resources. You should call Refresh in this case.
Refreshing individual resources only works with ImageBlendingMode set to Browser. If that property is set to WebTier, you must use Refresh, since the server combines images for all resources and sends a single image to the browser.