com.esri.arcgis.carto
Interface IMapFrame

All Superinterfaces:
IFrameElement, Serializable
All Known Implementing Classes:
MapFrame

public interface IMapFrame
extends IFrameElement, Serializable

Provides access to the members that control the map element object.

When To Use

IMapFrame is the default interface for the MapFrame object. The main purpose of the interface is to give the developer access to the map object stored within the frame, and it's associated locator rectangles.

Product Availability

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

See Also:
MapFrame, IFrameElement

Method Summary
 void addLocatorRectangle(ILocatorRectangle locator)
          Add a new locator rectangle to the data frame.
 IMapSurroundFrame createSurroundFrame(IUID clsid, IMapSurround optionalStyle)
          Returns the map surround frame element of the type given in clsid.
 IGraphicsContainer getContainer()
          The frame's container.
 int getExtentType()
          The way in which the map extent of the frame is specified.
 int getLocatorRectangleCount()
          The number of locator rectangles.
 IMap getMap()
          The associated map.
 IEnvelope getMapBounds()
          The bounds of the map displayed by the frame.
 double getMapScale()
          The scale at which the map should be displayed.
 ILocatorRectangle locatorRectangle(int index)
          Returns the locator rectangle at the specified index.
 void removeAllLocatorRectangles()
          Remove all the locator rectangles from the data frame.
 void removeLocatorRectangle(ILocatorRectangle locator)
          Remove a locator rectangle from the data frame.
 void setContainerByRef(IGraphicsContainer container)
          The frame's container.
 void setExtentType(int type)
          The way in which the map extent of the frame is specified.
 void setMapBounds(IEnvelope bounds)
          The bounds of the map displayed by the frame.
 void setMapByRef(IMap map)
          The associated map.
 void setMapScale(double scale)
          The scale at which the map should be displayed.
 
Methods inherited from interface com.esri.arcgis.carto.IFrameElement
getBackground, getBorder, getObject, getThumbnail, isDraftMode, setBackground, setBorder, setDraftMode
 

Method Detail

getMap

IMap getMap()
            throws IOException,
                   AutomationException
The associated map.

Remarks

The Map property will return the map object contained within the frame. Use this interface when you want to get the 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.
See Also:
MapFrame

setMapByRef

void setMapByRef(IMap map)
                 throws IOException,
                        AutomationException
The associated map.

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.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

getContainer

IGraphicsContainer getContainer()
                                throws IOException,
                                       AutomationException
The frame's container.

Description

The Container property provides access to the PageLayout object that the MapFrame object resides within. The back pointer to the PageLayout is needed so that the container can be refreshed when the MapFrame is updated via a connection point (i.e., not through the PageLayout itself).

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.IGraphicsContainer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

setContainerByRef

void setContainerByRef(IGraphicsContainer container)
                       throws IOException,
                              AutomationException
The frame's container.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
container - 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.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

getExtentType

int getExtentType()
                  throws IOException,
                         AutomationException
The way in which the map extent of the frame is specified.

Remarks

The ExtentType property is used to set or retrieve the method used to specify the extent of the map within the frame. There are three valid extent types that can be used:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.carto.esriExtentTypeEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

setExtentType

void setExtentType(int type)
                   throws IOException,
                          AutomationException
The way in which the map extent of the frame is specified.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
type - A com.esri.arcgis.carto.esriExtentTypeEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

getMapScale

double getMapScale()
                   throws IOException,
                          AutomationException
The scale at which the map should be displayed.

Remarks

The MapScale property returns or sets the current scale for the map. Use this property to obtain or update the scale. If updating the scale, be sure the ExtentType is set to esriExtentScale.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The scale
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

setMapScale

void setMapScale(double scale)
                 throws IOException,
                        AutomationException
The scale at which the map should be displayed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
scale - The scale (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

getMapBounds

IEnvelope getMapBounds()
                       throws IOException,
                              AutomationException
The bounds of the map displayed by the frame.

Remarks

The MapBounds property returns or sets the boundary (extent) of the map being shown in the frame. Use this property when you want to explicitly specify the coordinates of the data shown within the frame.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

setMapBounds

void setMapBounds(IEnvelope bounds)
                  throws IOException,
                         AutomationException
The bounds of the map displayed by the frame.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
bounds - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

createSurroundFrame

IMapSurroundFrame createSurroundFrame(IUID clsid,
                                      IMapSurround optionalStyle)
                                      throws IOException,
                                             AutomationException
Returns the map surround frame element of the type given in clsid. An optional style object may be specified.

Remarks

CreateSurroundFrame is used to create a new map surround element (north arrow, scale bar, etc.) based on the current map frame. For instance, if I create a new scale bar with CreateSurroundFrame, the scale bar will be related to the map frame and updates to the map within the frame will be reflected in the scale bar.

Use this method when you want to create a new map surround object related to the current map frame.

THE CLSID paramter refers to the Class ID of the object that will be created and housed in the frame. Common Class IDs used in this paramter are:

{6589F147-F7F7-11d2-B872-00600802E603} AlternatingScaleBar

{6589F148-F7F7-11d2-B872-00600802E603} DoubleAlternatingScaleBar

{6589F143-F7F7-11d2-B872-00600802E603} HollowScaleBar

{7A3F91E4-B9E3-11d1-8756-0000F8751720} Legend

{7A3F91E3-B9E3-11d1-8756-0000F8751720} MapInset

{7A3F91DF-B9E3-11d1-8756-0000F8751720} MapTitle

{7A3F91DD-B9E3-11d1-8756-0000F8751720} MarkerNorthArrow

{7A3F91DE-B9E3-11d1-8756-0000F8751720} Overview

{6589F140-F7F7-11d2-B872-00600802E603} ScaleLine

{7A3F91DC-B9E3-11d1-8756-0000F8751720} ScaleText

{6589F146-F7F7-11d2-B872-00600802E603} SingleDivisionScaleBar

{6589F141-F7F7-11d2-B872-00600802E603} SteppedScaleLine

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
clsid - A reference to a com.esri.arcgis.system.IUID (in)
optionalStyle - A reference to a com.esri.arcgis.carto.IMapSurround (in)
Returns:
A reference to a com.esri.arcgis.carto.IMapSurroundFrame
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLocatorRectangle

void addLocatorRectangle(ILocatorRectangle locator)
                         throws IOException,
                                AutomationException
Add a new locator rectangle to the data frame.

Remarks

AddLocatorRectangle is used to add a new locator rectangle to the current MapFrame. A locator rectangle represents the extent of another map frame in the page layout. Use this method to add a reference locator to the map frame.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
locator - A reference to a com.esri.arcgis.carto.ILocatorRectangle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

removeLocatorRectangle

void removeLocatorRectangle(ILocatorRectangle locator)
                            throws IOException,
                                   AutomationException
Remove a locator rectangle from the data frame.

Remarks

RemoveLocatorRectangle is used to remove the specified locator from the MapFrame. Use this method when you have several locators in the frame and you only want to remove a specific one.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
locator - A reference to a com.esri.arcgis.carto.ILocatorRectangle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

removeAllLocatorRectangles

void removeAllLocatorRectangles()
                                throws IOException,
                                       AutomationException
Remove all the locator rectangles from the data frame.

Remarks

RemoveAllLocatorRectangles is used to remove all of the locator rectangles within the MapFrame. Use this method when you have one or more locator rectangles and you want them deleted from the frame.

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.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

getLocatorRectangleCount

int getLocatorRectangleCount()
                             throws IOException,
                                    AutomationException
The number of locator rectangles.

Remarks

LocatorRectangleCount is used to return a count of all the locator rectangles within the MapFrame. Use this property to determine how many locator rectangles are in the frame.

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.
See Also:
MapFrame, IMapFrame.getMap(), IMapFrame

locatorRectangle

ILocatorRectangle locatorRectangle(int index)
                                   throws IOException,
                                          AutomationException
Returns the locator rectangle at the specified index.

Remarks

LocatorRectangle can be used to retrieve the specified locator from the MapFrame. Use this method when you need to obtain a specific locator rectangle and you know the index number of that object within the frame.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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