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




The main object for handling map characteristics.

Object Model









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.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Carto.View
      ESRI.ArcGIS.ADF.IMS.Carto.MapView

See Also

© 2010 All Rights Reserved.