Provides access to members that control the map.
Product Availability
When To Use
Use the IMap interface to display data from various data sources.
The IMap interface is a starting point for many of the tasks one does with a Map. For example, use IMap to add, delete, and access map layers containing data from various sources including feature layers and graphics layers; associate map surround objects (legends, scale bars, etc) with the Map; access the various properties of a Map including the area of interest, the current map units, and the spatial reference; select features and access the Map's current selection.
Members
Description | ||
---|---|---|
ActiveGraphicsLayer | The active graphics layer. If no graphic layers exist a basic memory graphics layer will be created. | |
AddLayer | Adds a layer to the map. | |
AddLayers | Adds multiple layers to the map, arranging them nicely if specified. | |
AddMapSurround | Adds a map surround to the map. | |
AnnotationEngine | The annotation (label) engine the map will use. | |
AreaOfInterest | Area of interest for the map. | |
Barriers | The list of barriers and their weight for labeling. | |
BasicGraphicsLayer | The basic graphics layer. | |
ClearLayers | Removes all layers from the map. | |
ClearMapSurrounds | Removes all map surrounds from the map. | |
ClearSelection | Clears the map selection. | |
ClipBorder | An optional border drawn around ClipGeometry. | |
ClipGeometry | A shape that layers in the map are clipped to. | |
ComputeDistance | Computes the distance between two points on the map and returns the result. | |
CreateMapSurround | Create and initialize a map surround. An optional style from the style gallery may be specified. | |
DelayDrawing | Suspends drawing. | |
DelayEvents | Used to batch operations together to minimize notifications. | |
DeleteLayer | Deletes a layer from the map. | |
DeleteMapSurround | Deletes a map surround from the map. | |
Description | Description of the map. | |
DistanceUnits | The distance units for the map. | |
Expanded | Indicates if the Map is expanded. | |
FeatureSelection | The feature selection for the map. | |
GetPageSize | Gets the page size for the map. | |
IsFramed | Indicates if map is drawn in a frame rather than on the whole window. | |
Layer | The layer at the given index. | |
LayerCount | Number of layers in the map. | |
Layers | The layers in the map of the type specified in the uid. If recursive is true it will return layers in group layers. | |
MapScale | The scale of the map as a representative fraction. | |
MapSurround | The map surround at the given index. | |
MapSurroundCount | Number of map surrounds associated with the map. | |
MapUnits | The units for the map. | |
MoveLayer | Moves a layer to another position. | |
Name | Name of the map. | |
RecalcFullExtent | Forces the full extent to be recalculated. | |
ReferenceScale | The reference scale of the map as a representative fraction. | |
SelectByShape | Selects features in the map given a shape and a selection environment (optional). | |
SelectFeature | Selects a feature. | |
SelectionCount | Number of selected features. | |
SetPageSize | Sets the page size for the map (optional). | |
SpatialReference | The spatial reference of the map. | |
SpatialReferenceLocked | Indicates whether the spatial reference is prevented from being changed. | |
UseSymbolLevels | Indicates if the Map draws using symbol levels. |
CoClasses that implement IMap
CoClasses and Classes | Description |
---|---|
Globe (esriGlobeCore) | A container for the display and manipulation of data in the Globe. |
Map | A container for the display and manipulation of map data. |
Scene (esri3DAnalyst) | A container for the display and manipulation of data. |
Remarks
The IMap interface is a starting point for many of the tasks one does with a map. For example, you can use IMap to add, delete, and access map layers containing data from various sources, including feature layers and graphics layers; associate map surround objects (legends, scale bars, and so on) with the map; access the various properties of a map, including the area of interest, the current map units, and the spatial reference; select features and access the Map objects current selection.
Every map document contains at least one Map object. Only one Map can have focus at a time, and this Map is called the focus map. IMxDocument provides access to all of the Map objects loaded in the document; IMxDocument::FocusMap returns a reference (IMap) to the Map currently with focus, and IMxDocument::Maps returns a reference (IMaps) to the entire collection of Map objects. A map document can contain any number of Map objects the focus map always represents the data view.
The Map object, manages a collection of Layer objects. Each layer has a spatial reference. A spatial reference defines a resolution (1/precision) and a coordinate system. The map coordinate system is automatically set to the coordinate system of the first layer loaded in the map and the resolution (1/precision) is calculated based on the union of all the layers extents.
See Also
IMxDocument.FocusMap Property | IMxDocument.Maps Property | IMaps Interface