com.esri.arcgis.carto
Interface IMapGrid

All Superinterfaces:
Serializable
All Known Subinterfaces:
ICustomOverlayGrid, IGraticule, IIndexGrid
All Known Implementing Classes:
CustomOverlayGrid, Graticule, IndexGrid, MeasuredGrid, MgrsGrid

public interface IMapGrid
extends Serializable

Provides access to members that control a map grid.

Description

IMapGrid is the main interface for setting properties that apply to all other types of grids. There are four specific types of MapGrid that all implement the IMapGrid interface. They are: IMeasuredGrid , IGraticule , IndexGrid , and ICustomGridOverlay .

Product Availability

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

See Also:
IGraticule, ICustomOverlayGrid, IMeasuredGrid, IIndexGrid, IMapGrid

Method Summary
 void draw(IDisplay display, IMapFrame pMapFrame)
          Draws the map grid for a map frame to the given display.
 void generateGraphics(IMapFrame pMapFrame, IGraphicsContainer graphicsContainer)
          Generates graphic elements corresponding to the grid lines and stores them in the specified graphics container.
 IMapGridBorder getBorder()
          The map grid border.
 double getExteriorWidth(IDisplay pDisplay, IMapFrame pMapFrame)
          The width (in display units) of the portion of the grid that is outside of the frame.
 IGridLabel getLabelFormat()
          The label format for map grid labels.
 ILineSymbol getLineSymbol()
          The symbol used to draw grid lines - null will draw no lines.
 String getName()
          The name of the map grid.
 short getSubTickCount()
          The number of subticks to draw between the major ticks.
 double getSubTickLength()
          The length of the subticks in points.
 ILineSymbol getSubTickLineSymbol()
          The symbol used to draw the subtick lines.
 double getTickLength()
          The length of the major ticks in points.
 ILineSymbol getTickLineSymbol()
          The line symbol used to draw the major ticks.
 IMarkerSymbol getTickMarkSymbol()
          The symbol used to draw tick marks at the grid interval intersections - null will draw no tick marks.
 boolean isVisible()
          Indicates if the map grid is visible.
 void prepareForOutput(int hDC, int dpi, tagRECT pixelBounds, IMapFrame pMapFrame)
          Prepares the map grid for output to a device.
 void queryLabelVisibility(boolean[] leftVis, boolean[] topVis, boolean[] rightVis, boolean[] bottomVis)
          Returns the visibility of the labels along all four sides of the map grid.
 void querySubTickVisibility(boolean[] leftVis, boolean[] topVis, boolean[] rightVis, boolean[] bottomVis)
          Returns the visibility of the subticks along all four sides of the map grid.
 void queryTickVisibility(boolean[] leftVis, boolean[] topVis, boolean[] rightVis, boolean[] bottomVis)
          Returns the visibility of the ticks along all four sides of the map grid.
 void setBorder(IMapGridBorder gridBorder)
          The map grid border.
 void setDefaults(IMapFrame pMapFrame)
          Sets the properties of the map grid to default values.
 void setLabelFormat(IGridLabel format)
          The label format for map grid labels.
 void setLabelVisibility(boolean leftVis, boolean topVis, boolean rightVis, boolean bottomVis)
          Sets the visibility of the labels along all four sides of the map grid.
 void setLineSymbol(ILineSymbol symbol)
          The symbol used to draw grid lines - null will draw no lines.
 void setName(String gridName)
          The name of the map grid.
 void setSubTickCount(short count)
          The number of subticks to draw between the major ticks.
 void setSubTickLength(double lengthPoints)
          The length of the subticks in points.
 void setSubTickLineSymbol(ILineSymbol symbol)
          The symbol used to draw the subtick lines.
 void setSubTickVisibility(boolean leftVis, boolean topVis, boolean rightVis, boolean bottomVis)
          Sets the visibility of the subticks along all four sides of the map grid.
 void setTickLength(double lengthPoints)
          The length of the major ticks in points.
 void setTickLineSymbol(ILineSymbol symbol)
          The line symbol used to draw the major ticks.
 void setTickMarkSymbol(IMarkerSymbol symbol)
          The symbol used to draw tick marks at the grid interval intersections - null will draw no tick marks.
 void setTickVisibility(boolean leftVis, boolean topVis, boolean rightVis, boolean bottomVis)
          Sets the visibility of the ticks along all four sides of the map grid.
 void setVisible(boolean visible)
          Indicates if the map grid is visible.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
The name of the map grid.

Description

Name is the name of the grid as it appears in the dataframe properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setName

void setName(String gridName)
             throws IOException,
                    AutomationException
The name of the map grid.

Description

Name is the name of the grid as it appears in the dataframe properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getLineSymbol

ILineSymbol getLineSymbol()
                          throws IOException,
                                 AutomationException
The symbol used to draw grid lines - null will draw no lines.

Description

LineSymbol is the line symbol that will be used to draw the grid lines.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setLineSymbol

void setLineSymbol(ILineSymbol symbol)
                   throws IOException,
                          AutomationException
The symbol used to draw grid lines - null will draw no lines.

Description

LineSymbol is the line symbol that will be used to draw the grid lines.
.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTickMarkSymbol

IMarkerSymbol getTickMarkSymbol()
                                throws IOException,
                                       AutomationException
The symbol used to draw tick marks at the grid interval intersections - null will draw no tick marks.

Description

TickMarkSymbol is the marker symbol that may be drawn at the intersection of grid lines.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTickMarkSymbol

void setTickMarkSymbol(IMarkerSymbol symbol)
                       throws IOException,
                              AutomationException
The symbol used to draw tick marks at the grid interval intersections - null will draw no tick marks.

Description

TickMarkSymbol is the marker symbol that may be drawn at the intersection of grid lines.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getLabelFormat

IGridLabel getLabelFormat()
                          throws IOException,
                                 AutomationException
The label format for map grid labels.

Description

LabelFormat is the label format for the grid labels. This is an IGridLabel, which is the generic interface that supports all the other specific types of grid labels, which in turn support the various number formats.

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.IGridLabel
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLabelFormat

void setLabelFormat(IGridLabel format)
                    throws IOException,
                           AutomationException
The label format for map grid labels.

Description

LabelFormat is the label format for the grid labels. This is an IGridLabel , which is the generic interface that supports all the other specific types of grid labels, which in turn support the various number formats.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTickLineSymbol

ILineSymbol getTickLineSymbol()
                              throws IOException,
                                     AutomationException
The line symbol used to draw the major ticks.

Description

TickLineSymbol is the line symbol that will be used to draw the major tick marks that are drawn just inside of or just outside of the Border.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTickLineSymbol

void setTickLineSymbol(ILineSymbol symbol)
                       throws IOException,
                              AutomationException
The line symbol used to draw the major ticks.

Description

TickLineSymbol is the line symbol that will be used to draw the major tick marks that are drawn just inside of or just outside of the Border .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTickLength

double getTickLength()
                     throws IOException,
                            AutomationException
The length of the major ticks in points.

Description

TickLength is the length of the line symbol in points (approx. 1/72 inch) that will be used to draw the major tick marks that are drawn just inside of or just outside of the Border.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTickLength

void setTickLength(double lengthPoints)
                   throws IOException,
                          AutomationException
The length of the major ticks in points.

Description

TickLength is the length of the line symbol in points (approx. 1/72 inch) that will be used to draw the major tick marks that are drawn just inside of or just outside of the Border .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSubTickCount

short getSubTickCount()
                      throws IOException,
                             AutomationException
The number of subticks to draw between the major ticks.

Description

SubTickCount is the number of subticks that will be displayed between the TickLineSymbols. Or, if you optionally use an ICalibratedMapBorder it is the number of times the fill symbol of the calibrated border changes. To use subtick marks, use an ISimpleMapBorder.

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.

setSubTickCount

void setSubTickCount(short count)
                     throws IOException,
                            AutomationException
The number of subticks to draw between the major ticks.

Description

SubTickCount is the number of subticks that will be displayed between the TickLineSymbols . Or, if you optionally use an ICalibratedMapBorder it is the number of times the fill symbol of the calibrated border changes. To use subtick marks, use an ISimpleMapBorder.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSubTickLineSymbol

ILineSymbol getSubTickLineSymbol()
                                 throws IOException,
                                        AutomationException
The symbol used to draw the subtick lines.

Description

SubTickLineSymbol is the line symbol used to draw subticks.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSubTickLineSymbol

void setSubTickLineSymbol(ILineSymbol symbol)
                          throws IOException,
                                 AutomationException
The symbol used to draw the subtick lines.

Description

SubTickLineSymbol is the line symbol used to draw subticks.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSubTickLength

double getSubTickLength()
                        throws IOException,
                               AutomationException
The length of the subticks in points.

Description

SubTickLength is the length of the subtick marks in points (approx. 1/72 inch).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSubTickLength

void setSubTickLength(double lengthPoints)
                      throws IOException,
                             AutomationException
The length of the subticks in points.

Description

SubTickLength is the length of the subtick marks in points (approx. 1/72 inch).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getBorder

IMapGridBorder getBorder()
                         throws IOException,
                                AutomationException
The map grid border.

Description

Border is the border that will be drawn around the map. Note that your LabelOffset will need to accomodate your border's width. There are two types of borders: ICalibratedMapBorder and ISimpleMapBorder.

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.IMapGridBorder
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBorder

void setBorder(IMapGridBorder gridBorder)
               throws IOException,
                      AutomationException
The map grid border.

Description

Border is the border that will be drawn around the map. Note that your LabelOffset will need to accomodate your border's width. There are two types of borders: ICalibratedMapBorder and ISimpleMapBorder .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isVisible

boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if the map grid is visible.

Description

Visible is whether the MapGrid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setVisible

void setVisible(boolean visible)
                throws IOException,
                       AutomationException
Indicates if the map grid is visible.

Description

Visible is whether the MapGrid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryLabelVisibility

void queryLabelVisibility(boolean[] leftVis,
                          boolean[] topVis,
                          boolean[] rightVis,
                          boolean[] bottomVis)
                          throws IOException,
                                 AutomationException
Returns the visibility of the labels along all four sides of the map grid.

Description

QueryLabelVisibility is whether the labels on each of the sides of the map grid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
leftVis - The leftVis (in/out: use single element array)
topVis - The topVis (in/out: use single element array)
rightVis - The rightVis (in/out: use single element array)
bottomVis - The bottomVis (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLabelVisibility

void setLabelVisibility(boolean leftVis,
                        boolean topVis,
                        boolean rightVis,
                        boolean bottomVis)
                        throws IOException,
                               AutomationException
Sets the visibility of the labels along all four sides of the map grid.

Description

SetLabelVisibility sets whether the labels on each of the sides of the map grid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryTickVisibility

void queryTickVisibility(boolean[] leftVis,
                         boolean[] topVis,
                         boolean[] rightVis,
                         boolean[] bottomVis)
                         throws IOException,
                                AutomationException
Returns the visibility of the ticks along all four sides of the map grid.

Description

QueryTickVisibility is whether the ticks on each side of the map grid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
leftVis - The leftVis (in/out: use single element array)
topVis - The topVis (in/out: use single element array)
rightVis - The rightVis (in/out: use single element array)
bottomVis - The bottomVis (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTickVisibility

void setTickVisibility(boolean leftVis,
                       boolean topVis,
                       boolean rightVis,
                       boolean bottomVis)
                       throws IOException,
                              AutomationException
Sets the visibility of the ticks along all four sides of the map grid.

Description

SetTickVisibility sets whether the ticks on each side of the map grid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

querySubTickVisibility

void querySubTickVisibility(boolean[] leftVis,
                            boolean[] topVis,
                            boolean[] rightVis,
                            boolean[] bottomVis)
                            throws IOException,
                                   AutomationException
Returns the visibility of the subticks along all four sides of the map grid.

Description

QuerySubTickVisibility is whether the subticks on each side of the map grid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
leftVis - The leftVis (in/out: use single element array)
topVis - The topVis (in/out: use single element array)
rightVis - The rightVis (in/out: use single element array)
bottomVis - The bottomVis (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSubTickVisibility

void setSubTickVisibility(boolean leftVis,
                          boolean topVis,
                          boolean rightVis,
                          boolean bottomVis)
                          throws IOException,
                                 AutomationException
Sets the visibility of the subticks along all four sides of the map grid.

Description

SetSubTickVisibility sets whether the subticks on each side of the map grid will be drawn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setDefaults

void setDefaults(IMapFrame pMapFrame)
                 throws IOException,
                        AutomationException
Sets the properties of the map grid to default values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

generateGraphics

void generateGraphics(IMapFrame pMapFrame,
                      IGraphicsContainer graphicsContainer)
                      throws IOException,
                             AutomationException
Generates graphic elements corresponding to the grid lines and stores them in the specified graphics container.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

prepareForOutput

void prepareForOutput(int hDC,
                      int dpi,
                      tagRECT pixelBounds,
                      IMapFrame pMapFrame)
                      throws IOException,
                             AutomationException
Prepares the map grid for output to a device.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
hDC - The hDC (A COM typedef) (in)
dpi - The dpi (in)
pixelBounds - A Structure: com.esri.arcgis.system.tagRECT (in)
pMapFrame - A reference to a com.esri.arcgis.carto.IMapFrame (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

draw

void draw(IDisplay display,
          IMapFrame pMapFrame)
          throws IOException,
                 AutomationException
Draws the map grid for a map frame to the given display.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getExteriorWidth

double getExteriorWidth(IDisplay pDisplay,
                        IMapFrame pMapFrame)
                        throws IOException,
                               AutomationException
The width (in display units) of the portion of the grid that is outside of the frame.

Product Availability

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

Parameters:
pDisplay - A reference to a com.esri.arcgis.display.IDisplay (in)
pMapFrame - A reference to a com.esri.arcgis.carto.IMapFrame (in)
Returns:
The pWidth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.