ESRI.ArcGIS.ADF.IMS
MapView Class
Members  Example  See Also  Send Feedback
ESRI.ArcGIS.ADF.IMS.Carto Namespace : MapView Class




The main object for handling map characteristics.

Object Model

MapView Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class MapView 
   Inherits View
Visual Basic (Usage)Copy Code
Dim instance As MapView
C# 
[SerializableAttribute()]
public class MapView : View 

Example

The example below retrieves the MapView used in a Map web control, and sets a map layer to invisible. See the MapView constructors for an example of creating a new MapView when not using the Map web control.
Visual BasicCopy Code
Dim mapFunct As MapFunctionality = CType(Map1.GetFunctionality(0), MapFunctionality)
Dim mapView As MapView = mapFunct.MapView
 
mapView.Layers.FindByName("Countries").Visible = False
C#Copy Code
MapFunctionality mapFunct = (MapFunctionality)Map1.GetFunctionality(0);
MapView mapView = mapFunct.MapView;
 
mapView.Layers.FindByName("Countries").Visible = false;

Remarks

This is the central organizing object for the map. It contains map characteristics such as map layers, selection layers, legend, spatial reference (projection), and map extent.

If using the ADF Map web control, the MapView for an ArcIMS service in the map may be retrieved with Map.GetFunctionality, by accessing the appropriate item in the functionality collection. Cast the item to MapFunctionality, then retrieve the MapView. See the Example for an illustration.

If not using the web controls, a MapView object can be created from the MapView constructors, or with the MapService.CreateMapView() method.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.