com.esri.arcgis.carto
Interface ICenterAndScale

All Superinterfaces:
Serializable
All Known Implementing Classes:
CenterAndScale

public interface ICenterAndScale
extends Serializable

Provides access to the Center And Scale Map Area Interface.

Remarks

One way to change the map extent is using the object CenterAndScale. Create a new CenterAndScale object and set the geographic extent of the map by setting a center point and a map scale. If the spatial reference of the MapServer object has changed, remember to adjust the spatial reference of the center point to match the new spatial reference.

It is important to remember that CenterAndScale does not compute map extent. When used in IMapImage can be used to get the updated map extent. To compute map extent based on a center point and a scale without calling the ArcGIS Server, a client side solution is required. Please see the code snippet below.

When To Use

Use ICenterAndScale to apply a new geographic extent to a map by specifying a center point and map scale.

Product Availability

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


Method Summary
 IPoint getCenter()
          The center of the map.
 double getMapScale()
          The map scale.
 void setCenter(IPoint center)
          The center of the map.
 void setMapScale(double scale)
          The map scale.
 

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.

getMapScale

double getMapScale()
                   throws IOException,
                          AutomationException
The map scale.

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.

setMapScale

void setMapScale(double scale)
                 throws IOException,
                        AutomationException
The map scale.

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.