com.esri.arcgis.carto
Interface IMaps2

All Superinterfaces:
Serializable
All Known Implementing Classes:
IMaps2Proxy

public interface IMaps2
extends Serializable

Provides access to members of map collection.

Remarks

Every map document contains at least one Map object but a map document can contain any number of Map objects. The Maps object contains a collection of all the maps of the document. IMxDocument::Maps returns a reference to this collection.

The IMaps2 interface is a collection of map objects and contains method and properties to manage the maps contained by the document.

Only one Map can have focus at a time, and this Map is called the focus map. IMxDocument::FocusMap returns a reference to the Map currently with focus.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void add(IMap map)
          Adds a map to the collection.
 IMap create()
          Creates a new map.
 int getCount()
          Number of maps.
 IMap getItem(int index)
          The map at the given index.
 void moveItem(IMap pMap, int toIndex)
          Moves the map to the given index.
 void remove(IMap map)
          Removes a map from the collection.
 void removeAt(int index)
          Removes a map at the specified index.
 void reset()
          Removes all maps from the collection.
 

Method Detail

getCount

int getCount()
             throws IOException,
                    AutomationException
Number of maps.

Remarks

The Count property returns the number of Map objects in the collection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

IMap getItem(int index)
             throws IOException,
                    AutomationException
The map at the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.carto.IMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

create

IMap create()
            throws IOException,
                   AutomationException
Creates a new map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

void remove(IMap map)
            throws IOException,
                   AutomationException
Removes a map from the collection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
map - A reference to a com.esri.arcgis.carto.IMap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

void add(IMap map)
         throws IOException,
                AutomationException
Adds a map to the collection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
map - A reference to a com.esri.arcgis.carto.IMap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAt

void removeAt(int index)
              throws IOException,
                     AutomationException
Removes a map at the specified index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

void reset()
           throws IOException,
                  AutomationException
Removes all maps from the collection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveItem

void moveItem(IMap pMap,
              int toIndex)
              throws IOException,
                     AutomationException
Moves the map to the given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pMap - A reference to a com.esri.arcgis.carto.IMap (in)
toIndex - The toIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.