com.esri.arcgis.carto
Interface ICenterAndSize

All Superinterfaces:
Serializable
All Known Implementing Classes:
CenterAndSize

public interface ICenterAndSize
extends Serializable

Provides access to the Center And Size Map Area Interface.

Remarks

One way to change the map extent is using the object CenterAndSize. Create a new CenterAndSize object and set the geographic extent by setting a center point, the height and the width of the map image. The height and width will be in map units. If the spatial reference of the map has changed, remember to adjust the center point coordinates and height and width units accordingly.

If the aspect ratio of the input map is different from the aspect ratio of the requested image, the returned map extent will be adjusted to fit the requested image.

When To Use

Use ICenterAndSize to apply a new geographic extent to a map by specifying a center point and the height and width of the map image.

Product Availability

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


Method Summary
 IPoint getCenter()
          The center of the map.
 double getHeight()
          The height of the map expressed in map units.
 int getUnits()
          The current map units.
 double getWidth()
          The width of the map expressed in map units.
 void setCenter(IPoint center)
          The center of the map.
 void setHeight(double height)
          The height of the map expressed in map units.
 void setUnits(int units)
          The current map units.
 void setWidth(double width)
          The width of the map expressed in map units.
 

Method Detail

getCenter

IPoint getCenter()
                 throws IOException,
                        AutomationException
The center of 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.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCenter

void setCenter(IPoint center)
               throws IOException,
                      AutomationException
The center of the map.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getHeight

double getHeight()
                 throws IOException,
                        AutomationException
The height of the map expressed in map units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setHeight

void setHeight(double height)
               throws IOException,
                      AutomationException
The height of the map expressed in map units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getWidth

double getWidth()
                throws IOException,
                       AutomationException
The width of the map expressed in map units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setWidth

void setWidth(double width)
              throws IOException,
                     AutomationException
The width of the map expressed in map units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getUnits

int getUnits()
             throws IOException,
                    AutomationException
The current map units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.system.esriUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setUnits

void setUnits(int units)
              throws IOException,
                     AutomationException
The current map units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
units - A com.esri.arcgis.system.esriUnits constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.