com.esri.arcgis.carto
Interface IMapGrids

All Superinterfaces:
Serializable
All Known Implementing Classes:
MapFrame

public interface IMapGrids
extends Serializable

Provides access to members that control the map grids in a data frame.

When To Use

IMapGrids is implemented only by the MapFrame object, but it is not the default interface for that object (IMapFrame is the default). Use this interface when you want to retrieve or set the grids (sometimes known as graticules) displayed with a particular MapFrame. The Grids are used to provide reference information for the map.

Product Availability

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


Method Summary
 void addMapGrid(IMapGrid mapGrid)
          Adds a map grid to the map frame.
 void clearMapGrids()
          Clears all map grids from the map frame.
 void deleteMapGrid(IMapGrid mapGrid)
          Deletes a map grid from the map frame.
 IMapGrid getMapGrid(int index)
          The map grid at the specified index.
 int getMapGridCount()
          The number of map grids associated with the map frame.
 void setMapGrid(int index, IMapGrid mapGrid)
          The map grid at the specified index.
 

Method Detail

getMapGridCount

int getMapGridCount()
                    throws IOException,
                           AutomationException
The number of map grids associated with the map frame.

Remarks

MapGridCount will return then number of grids (graticules) attached to the MapFrame.

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.

getMapGrid

IMapGrid getMapGrid(int index)
                    throws IOException,
                           AutomationException
The map grid at the specified 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.IMapGrid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapGrid

void setMapGrid(int index,
                IMapGrid mapGrid)
                throws IOException,
                       AutomationException
The map grid at the specified index.

Product Availability

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

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

addMapGrid

void addMapGrid(IMapGrid mapGrid)
                throws IOException,
                       AutomationException
Adds a map grid to the map frame.

Remarks

AddMapGrid will add a new MapGrid to the MapFrame. Use this interface when you have a valid IMapGrid object that you want to associate a MapFrame object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deleteMapGrid

void deleteMapGrid(IMapGrid mapGrid)
                   throws IOException,
                          AutomationException
Deletes a map grid from the map frame.

Remarks

DeleteMapGrid is used to remove the specified IMapGrid from the MapFrame. After executing the method, you still have a valid IMapGrid that could then be added to a different MapFrame.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

clearMapGrids

void clearMapGrids()
                   throws IOException,
                          AutomationException
Clears all map grids from the map frame.

Remarks

ClearMapGrids will remove all associated grids (graticules) from the MapFrame. Use this method when you want to programmatically remove all associated MapGrids from the MapFrame.

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.