Members
Properties
The following table provides a list of properties and
events of interest. For complete reference information, see
the Map control in the library reference section.
| Property Name | Type | Description |
|---|---|---|
| EnableContinuousCallback | bool | Whether images will be fetched continuously during panning of the map or only when panning is complete. |
| EnableTileCaching | bool | Whether tiles that have been retrieved during panning of the map will be cached until the scale is changed. |
| EnableZoomAnimation | bool | Whether animation will happen for fixed zoom operations. |
| ImageBlendingMode | ImageBlendingMode | Whether images will be blended on the web server or on the browser. |
| ImageFormat | Format of output image. | |
| InitialExtent | InitialExtent | The initial extent at which the Map first renders. |
| MapResourceManager | string | The ID of the MapResourceManager whose resources will be displayed on the map. |
| PreferredTileHeight | int | The preferred tile height to request if the resources are not bound to a tile caching scheme. |
| PreferredTileWidth | int | The preferred tile width to request if the resources are not bound to a tile caching scheme. |
| PrimaryMapResource | string | The primary MapResource whose properties other MapResources will adhere to for blending to take place. This property cannot be a Graphics Layer. If the property is empty the last resource item will be used. |
| Rotation | double | The rotation of the map in degrees. If value is a NaN, the primary map resource's rotation is used. Otherwise, the rotation is applied. 0 is a valid rotation value and can be used to change the default rotation of the primary map resource. When rotation is applied, all resources in the map should support map rotation. |
| ScrollWheelZoom | bool | Whether the map can be zoomed using the mouse scroll wheel. |
| ToolItems | MapToolItemCollection | Map Tool Item collection. |
| UseMimeData | bool | Set true to store output images in session and stream them to the client or to store them on the file system instead. |
| VirtualDirectory | string | The path to the virtual directory in which images can be written, for example, ~/output/. |
Events
| Event Type | Description |
|---|---|
| Circle | Raised when the control processes a tool associated with the Circle Client Tool Action. |
| DragImage | Raised when the control processes a tool associated with the DragImage Client Tool Action. |
| DragRectangle | Raised when the control processes a tool associated with the DragRectangle Client Tool Action. |
| ExtentChanged | Occurs when the extent of this control has changed. |
| Line | Raised when the control processes a tool associated with the Line Client Tool Action. |
| MapClick | Occurs when the control is clicked. |
| Oval | Raised when the control processes a tool associated with the Oval Client Tool Action. |
| Point | Raised when the control processes a tool associated with the Point Client Tool Action. |
| Polygon | Raised when the control processes a tool associated with the Polygon Client Tool Action. |
| Polyline | Raised when the control processes a tool associated with the Polyline Client Tool Action. |
| Refreshed | Occurs when the Map is fully refreshed. Does not occur if only one resource is refreshed with browser blending. |
| Resized | Occurs when the Map control is resized. |
| ResourceRefreshed | Occurs when a map resource is refreshed. May be used to detect single-resource refreshing with browser blending. |
| RotationAngleChanged | Occurs when the rotation of the map has changed. |
| ScaleChanged | Occurs when the scale of the Map is changed. |
| TilingSchemeInitialized | Occurs when the Map is done initializing the TilingScheme. |
| Keyboard\Mouse Shortcut | Map Action |
|---|---|
| SHIFT, left mouse click, hold, and drag box | Zoom In |
| CTRL, left mouse click, hold, and drag box | Zoom Out |
| Left mouse click, hold, and drag | Pan |
| NumLock disabled, use keypad | Pan |
| Arrow keys, Home, End, Page Up, Page Down | Pan |
| NumLock enabled, + | Zoom In |
| NumLock enabled, - | Zoom Out |
protected void Page_PreRender(object sender, EventArgs ea){
if (!Page.IsPostBack){
ESRI.ArcGIS.ADF.Web.Geometry.Envelope initextent = new ESRI.ArcGIS.ADF.Web.Geometry.Envelope(-110, 30,-100, 40);
Map1.Extent = initextent;
}
}
Protected Sub Page_PreRender(sender As object, ea As EventArgs)
If Not Page.IsPostBack Then
Dim initextent As New ESRI.ArcGIS.ADF.Web.Geometry.Envelope(-110, 30,-100, 40)
Map1.Extent = initextent
EndIf
End Sub
ArrayList bitmaps = new ArrayList();
foreach (IMapFunctionality mf in Map1.GetFunctionalities()){
mf.DisplaySettings.ImageDescriptor.Height = imgheight;
mf.DisplaySettings.ImageDescriptor.Width = imgwidth;
mf.DisplaySettings.ImageDescriptor.TransparentBackground = true;
mf.DisplaySettings.ImageDescriptor.ImageFormat = ESRI.ArcGIS.ADF.Web.ImageFormat.PNG8;
ESRI.ArcGIS.ADF.Web.MapImage mi = mf.DrawExtent(Map1.Extent);
bitmaps.Add(mi.GetImage());
}
System.Drawing.Bitmap newimg = new System.Drawing.Bitmap(imgwidth, imgheight);
System.Drawing.Graphics imggraphics = System.Drawing.Graphics.FromImage(newimg);
imggraphics.FillRectangle(new System.Drawing.SolidBrush(System.Drawing.Color.LightGray), 0, 0, imgwidth, imgheight);
for (int j = bitmaps.Count-1; j >=0; j--){
System.Drawing.Bitmap bmp = (System.Drawing.Bitmap)bitmaps[j];
imggraphics.DrawImage(bmp, 0, 0, imgwidth, imgheight);
}
| Map Resources | Primary Map Resource |
|---|---|
| 1 dynamic or 1 cached resource | If only one resource is present, it is the primary map resource. |
| 2 dynamic resources | The last resource in the resource items collection. |
| 2 cached resources | The first cached resource in the resource items collection. |
| 1 dynamic and 1 cached resource | The first cached resource in the resource items collection. |
If you are overlaying multiple cached services with the same spatial reference and matching scales, choose either cached service as the primary map resource. In this scenario, the Zoom Level control will include the scale levels from all cached services.
If you are overlaying multiple cached services with different spatial
references or scales, choose as the Primary Map Resource the service
whose spatial reference you want used in the map. The Zoom Level
control will only include the scale levels from this service. Images from
the other cached service will be drawn dynamically to match the coordinate
system and scales of the Primary Map Resource. In other words, the cache from
the non-Primary Map Resource will not be used.
If you are overlaying a cached service with a dynamic service, you should
generally choose the cached service as the Primary Map Resource. If the
dynamic service is the Primary Map Resource, the cached service will be treated
as a dynamic service, thus sacrificing the performance benefit of the
cache.
Do not set the Primary Map Resource to a Graphics Layer map resource
item. Graphics Layers represent Web ADF Graphics Datasets which are
designed to be utilized programmatically at runtime. As a result, a
Graphics Layer does not have the spatial properties (e.g. spatial
reference, scale, etc.) the Map needs to initialize and
function properly. Also, if you have not explicitly defined a
Primary Map Resource, make sure the last resource item is not a Graphics
Layer.
Map1.Reset(); Map1.Rotation = 45;Rotating an ArcGIS Server cached map service requires that dynamic map images are generated - the cached map tiles will not be used. As a result, many of the performance benefits of a cached map service are negated. Web ADF controls that work with the Map also support rotation, such as the Navigation, Magnifier, and OverviewMap controls.
| Data Source Type | Dynamic Tiling Default |
|---|---|
| ArcGIS Server Local | Disabled |
| ArcGIS Server Internet | Disabled |
| ArcIMS | Enabled |
| ArcWeb | Disabled |
| OGC\WMS | Disabled |
| Graphics | Enabled |

| Tile retrieval: Browser blending | |
|---|---|
| JAVASCRIPT: Virtual Directory |
Browser retrieves the image directly by its URL using JavaScript. This is probably the most common scenario when defaults are used to set up the map service and web application, and no security is applied to the map service. It is also typically the fastest way to retrieve map tiles. |
| JAVASCRIPT: Tile Web Service |
Browser calls an HTTP handler on the Web service running on the ArcGIS Server machine that reads the image from disk and sends back the image as a stream of bytes. |
| TILE HANDLER: Virtual Directory |
Browser calls an HTTP handler (TileHandler.ashx) on the Web ADF server that uses credentials to access a secured virtual directory and sends back the image as a stream of bytes. |
| TILE HANDLER: Tile Web Service |
Browser calls an HTTP handler (TileHandler.ashx) on ADF server that uses credentials to access an HTTP handler on ArcGIS Server machine. The handler on The ArcGIS Server machine reads the image from disk and streams back the image as a series of bytes. |
| TILE HANDLER: GetMapTile |
Browser calls an HTTP handler (TileHandler.ashx) on ADF server that in turn calls a web service method that returns image bytes. The HTTP handler streams back the bytes of the image. In this case, the ArcGIS Server Object Manager and Server Object Container are used to retrieve the tile. |
| Tile retrieval: Web tier blending | |
|---|---|
| WEB TIER: Virtual directory |
During page life cycle, the image is read from the virtual directory and is blended to overlay with other resources (layers) in the map. The blended image is then sent to the browser. |
| WEB TIER: Tile Web service |
During page life cycle, the image is retrieved from an HTTP handler on the ArcGIS Server machine. The handler on the ArcGIS Server machine reads the image from disk and streams back the bytes. The image is blended to overlay with other resources (layers) in the map. The blended image is then sent to the browser. |
| WEB TIER: GetMapTile |
During page life cycle, the image is retrieved through a Web service method that returns image bytes. The image is blended to overlay with other resources (layers) in the map. The blended image is then sent to the browser. |