|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IARMap
Provides access to members that control the ARMap.
The IARMap interface is a starting point for navigating around the map, setting map properties, and accessing any layer's contained within the map.
Method Summary | |
---|---|
void |
centerAt(double xCoord,
double yCoord)
Moves the center of the map to the specified point. |
void |
centerAtBookmark(Object vBookmarkID)
Centers the map display on the bookmark. |
IARLayer |
getARLayer(int index)
The layer at the specified index. |
int |
getARLayerCount()
The number of layer in the map's layer collection. |
int |
getBookmarkCount()
The number of bookmarks in the map's bookmark collection. |
String |
getBookmarkName(int index)
The name of the bookmark. |
Object |
getCustomProperty()
A property to associate data with an object. |
String |
getDescription()
The description of the map. |
int |
getDistanceUnits()
The distance units of the map. |
void |
getExtent(double[] xMin,
double[] yMin,
double[] xMax,
double[] yMax)
The visible extent of the map. |
void |
getFullExtent(double[] xMin,
double[] yMin,
double[] xMax,
double[] yMax)
The extent of all the data within the map. |
Object |
getInternalObject()
The internal ArcObjects IMap object. |
double |
getMapScale()
The scale of the map as a representative fraction. |
int |
getMapUnits()
The geographical units of the map. |
String |
getName()
The name of the map. |
double |
getReferenceScale()
The reference scale of the map as a representative fraction. |
double |
getRotation()
The number of degrees the map display is rotated. |
String |
getSpatialReferenceName()
The name of the map's spatial reference. |
boolean |
isCanRedoExtent()
Indicates if there is a map extent that can be redone. |
boolean |
isCanUndoExtent()
Indicates if there is a map extent that can be undone. |
void |
pan(int direction,
double screenPercentage)
Pans the map by a factor in a specified direction. |
IARFeatureSet |
queryARFeatures(IARSearchDef pSearchDef)
Searches the map using a search definition and returns an ARFeatureSet. |
void |
redoExtent()
Redo the next map extent in the stack. |
void |
refresh(boolean refreshNow)
Redraws the map display area. |
IARFeatureCursor |
searchARFeatures(IARSearchDef pSearchDef)
Searches the map using a search definition and returns an ARFeatureCursor. |
void |
setCustomProperty(Object pVal)
A property to associate data with an object. |
void |
setExtent(double xMin,
double yMin,
double xMax,
double yMax)
Sets the visible extent of the map. |
void |
setMapScale(double mapScale)
The scale of the map as a representative fraction. |
void |
setRotation(double mapRotation)
The number of degrees the map display is rotated. |
void |
toMapPoint(int x,
int y,
double[] xCoord,
double[] yCoord)
Converts a point in device coordinates (typically pixels) to coordinates in map units. |
void |
undoExtent()
Undo to the previous map extent in the stack. |
void |
zoomIn(double factor)
Zooms in on the map by a factor. |
void |
zoomOut(double factor)
Zooms out on the map by a factor. |
void |
zoomToBookmark(Object vBookmarkID)
Zooms the map display to the bookmark. |
void |
zoomToFullExtent()
Zoom to the full extent of all data within the map. |
Method Detail |
---|
void setMapScale(double mapScale) throws IOException, AutomationException
mapScale
- The mapScale (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getMapScale() throws IOException, AutomationException
The MapScale property will return an error if the MapUnits are unknown or if passed a value of 0.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#getSpatialReferenceName()
,
com.esri.arcgis.publishercontrols.IARMap#getReferenceScale()
,
com.esri.arcgis.publishercontrols.IARMap#getDistanceUnits()
,
com.esri.arcgis.publishercontrols.IARMap#getMapUnits()
void refresh(boolean refreshNow) throws IOException, AutomationException
The Refresh method causes screen display area of the ARMap to be completely redrawn by sending a windows paint event. Use the Refresh method to ensure the ARMap is displaying the current state of the data. For example, if data is in an SDE server with many users editing the data, refreshing the ARMap ensures the user of a ArcReaderControl application sees any new edits.
Specify whether to immediately redraw the ARMap or whether to queue up the redraw to happen at some point in the immediate future. For example, if there are many extent changes, but only the last extent needs displaying to the user pass False to the Refresh method. The paint event will be queued and the ARMap will be redrawn once after the last extent change. However, if every extent change needs displaying to the user, pass True to the Refresh method. The ARMap will be redrawn after every extent change. Likewise pass True after an extent change, but before flashing or flickering an ARFeature.
The Refresh method triggers the following events:
OnBeforeScreenDraw
OnAfterScreenDraw
refreshNow
- The refreshNow (in, optional, pass false if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getName() throws IOException, AutomationException
The Name of the ARMap. This is the name that appears in the Table of Contents (TOC) on the left hand side of the ArcReaderControl.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getARLayerCount() throws IOException, AutomationException
The ARLayerCount property returns the number of ARLayer's within the ARMap.
This does not include any IARLayer::ChildARLayer objects if IARLayer::IsGroupLayer returns true for an ARLayer.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IARLayer getARLayer(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getDescription() throws IOException, AutomationException
Returns a description of the ARMap at the time the document was published.
Note that map's do not have a description by default.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getSpatialReferenceName() throws IOException, AutomationException
Returns the name of the spatial reference the ARMap is using to display data.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#getReferenceScale()
,
com.esri.arcgis.publishercontrols.IARMap#getDistanceUnits()
int getMapUnits() throws IOException, AutomationException
The ARMap's map units. Any coordinates returned from the GetExtent, GetFullExtent and ToMapPoint methods will be in MapUnits. Likewise the coordinates passed into the SetExtent and CenterAt methods need to be in MapUnits.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#getSpatialReferenceName()
,
com.esri.arcgis.publishercontrols.IARMap#getMapScale()
,
com.esri.arcgis.publishercontrols.IARMap#getReferenceScale()
,
com.esri.arcgis.publishercontrols.IARMap#getDistanceUnits()
int getDistanceUnits() throws IOException, AutomationException
The DistanceUnits are used when reporting measurements and are used by the esriARToolMapMeasure tool when it is set as the IARControl::CurrentARTool and is used on the ARMap object.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#getSpatialReferenceName()
,
com.esri.arcgis.publishercontrols.IARMap#getMapScale()
,
com.esri.arcgis.publishercontrols.IARMap#getReferenceScale()
,
com.esri.arcgis.publishercontrols.IARMap#getMapUnits()
void setExtent(double xMin, double yMin, double xMax, double yMax) throws IOException, AutomationException
Sets the xmin, ymin, xmax and ymax coordinates of the ARMap's current visible extent in MapUnits. The SetExtent method automatically refreshes the ARMap's display area.
xMin
- The xMin (in)yMin
- The yMin (in)xMax
- The xMax (in)yMax
- The yMax (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomToFullExtent()
,
com.esri.arcgis.publishercontrols.IARMap#getFullExtent(double[], double[], double[], double[])
,
com.esri.arcgis.publishercontrols.IARMap#getExtent(double[], double[], double[], double[])
void getExtent(double[] xMin, double[] yMin, double[] xMax, double[] yMax) throws IOException, AutomationException
Returns the xmin, ymin, xmax and ymax coordinates of the ARMap's current visible extent in MapUnits.
xMin
- The xMin (in/out: use single element array)yMin
- The yMin (in/out: use single element array)xMax
- The xMax (in/out: use single element array)yMax
- The yMax (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomToFullExtent()
,
com.esri.arcgis.publishercontrols.IARMap#setExtent(double, double, double, double)
,
com.esri.arcgis.publishercontrols.IARMap#getFullExtent(double[], double[], double[], double[])
void getFullExtent(double[] xMin, double[] yMin, double[] xMax, double[] yMax) throws IOException, AutomationException
Returns the xmin, ymin, xmax and ymax coordinates of the full extent of all data layers in the ARMap in MapUnits.
xMin
- The xMin (in/out: use single element array)yMin
- The yMin (in/out: use single element array)xMax
- The xMax (in/out: use single element array)yMax
- The yMax (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomToFullExtent()
,
com.esri.arcgis.publishercontrols.IARMap#setExtent(double, double, double, double)
,
com.esri.arcgis.publishercontrols.IARMap#getExtent(double[], double[], double[], double[])
double getReferenceScale() throws IOException, AutomationException
The ReferenceScale property indicates the scale to which all symbol and text sizes used in the ARMap will be made relative.
A ReferenceScale set to 0 indicates that no ReferenceScale is set, and the size of any symbols or text on the ARMap will remain the same irrespective of MapScale. When a ReferenceScale is set, the size of any symbols or text on the ARMap will change as the MapScale changes. For example, text labels will get larger if you zoom in to a scale larger than the ReferenceScale and smaller if you zoom out to a scale smaller than the ReferenceScale.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#getSpatialReferenceName()
,
com.esri.arcgis.publishercontrols.IARMap#getDistanceUnits()
void zoomIn(double factor) throws IOException, AutomationException
Zooms in on the ARMap from the center of its current visible extent by a specified factor. This factor represents the ratio between the new visible extent and the previous visible extent and will cause the MapScale property to change. For example, zooming in by a factor of 2, is the same as zooming out by a factor of 0.5 and vice versa.
factor
- The factor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomOut(double)
,
com.esri.arcgis.publishercontrols.IARMap#centerAt(double, double)
,
com.esri.arcgis.publishercontrols.IARMap#pan(int, double)
void zoomOut(double factor) throws IOException, AutomationException
Zooms out on the ARMap from the center of its current visible extent by a specified factor. This factor represents the ratio between the new visible extent and the previous visible extent and will cause the MapScale property to change. For example, zooming in by a factor of 2, is the same as zooming out by a factor of 0.5 and vice versa.
factor
- The factor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomIn(double)
,
com.esri.arcgis.publishercontrols.IARMap#centerAt(double, double)
,
com.esri.arcgis.publishercontrols.IARMap#pan(int, double)
void pan(int direction, double screenPercentage) throws IOException, AutomationException
Pans the ARMap display area in the specified direction, by a specified screen percentage. The extent of the ARMap will change, but the MapScale will remain the same.
A percentage of 0 will not actually offset the ARMap in the display area, a percentage of 25 will pan the current visible extent by a quarter of its width, and a percentage of 100 will offset the ARMap in the display area completely, so that any of the ARMap visible before the Pan will no longer be visible.
direction
- A com.esri.arcgis.controls.esriARDirection constant (in)screenPercentage
- The screenPercentage (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomIn(double)
,
com.esri.arcgis.publishercontrols.IARMap#zoomOut(double)
,
com.esri.arcgis.publishercontrols.IARMap#centerAt(double, double)
void centerAt(double xCoord, double yCoord) throws IOException, AutomationException
The CenterAt method positions the supplied x and y map coordinates in the center of the ARMap display area. The extent of the ARMap will change, but the MapScale will remain the same.
xCoord
- The xCoord (in)yCoord
- The yCoord (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#zoomIn(double)
,
com.esri.arcgis.publishercontrols.IARMap#zoomOut(double)
,
com.esri.arcgis.publishercontrols.IARMap#pan(int, double)
void setRotation(double mapRotation) throws IOException, AutomationException
mapRotation
- The mapRotation (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getRotation() throws IOException, AutomationException
The Rotation property indicates the rotation of the ARMap display, and so the angle data appears inside the ARMap. The angle of the rotation is measured in degrees. Positive numbers rotate the display counter clockwise and negative numbers clockwise.
Use the Refresh method to redraw the ARMap display area in order to see the rotated ARMap data.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IARFeatureSet queryARFeatures(IARSearchDef pSearchDef) throws IOException, AutomationException
Queries the ARMap based upon an attribute or spatial query as defined by the ArcReaderSearchDef. Only ARLayer objects with a Searchable property set to true within the ARMap will be searched.
All ARFeature objects matching the query are instantiated in the ARFeatureSet. If the number of features could be very large, this may not be desirable as it may result in a long delay and consume a large amount of memory. Instead use the SearchARFeatures method. If there are no features matching the query the IARFeatureSet::ARFeatureCount property will return 0.
The QueryARFeatures method will return an error if the currently loaded document was not published with permission to QueryFeatures. Use the IARControl::HasDocumentPermission method to determine this.
If there is an error with the query, such as ill-formed SQL, the error returned will contain an error description from the underlying database.
pSearchDef
- A reference to a com.esri.arcgis.controls.IARSearchDef (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void toMapPoint(int x, int y, double[] xCoord, double[] yCoord) throws IOException, AutomationException
Converts the x and y screen coordinates supplied in pixels to x and y map coordinates. The screen coordinates are relative to the top left of the ARMap display area. To obtain the offset of the display area from the top left of the ArcReaderControl use the IARControl::ViewTop and IARControl::ViewLeft properties. The returned map coordinates will be in MapUnits.
x
- The x (in)y
- The y (in)xCoord
- The xCoord (in/out: use single element array)yCoord
- The yCoord (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isCanUndoExtent() throws IOException, AutomationException
Whenever the extent of the map changes the previous extent is placed onto an extent stack. It is possible to navigate backwards and forwards through any extents in the extent stack.
CanUndoExtent indicates if there is an ARMap extent that can be undone. Use the property before using the UndoExtent method.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#undoExtent()
,
com.esri.arcgis.publishercontrols.IARMap#redoExtent()
,
com.esri.arcgis.publishercontrols.IARMap
void undoExtent() throws IOException, AutomationException
Undo the ARMap extent to the previous extent in the extent stack. Use the CanUndoExtent property to determine whether the extent can be undone.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#redoExtent()
,
com.esri.arcgis.publishercontrols.IARMap
boolean isCanRedoExtent() throws IOException, AutomationException
Whenever the extent of the map changes the previous extent is placed onto an extent stack. It is possible to navigate backwards and forwards through any extents in the extent stack.
CanRedoExtent indicates if there is an ARMap extent that can be redone. Use the property before using the RedoExtent method.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#undoExtent()
,
com.esri.arcgis.publishercontrols.IARMap#redoExtent()
,
com.esri.arcgis.publishercontrols.IARMap
void redoExtent() throws IOException, AutomationException
Redo the ARMap extent to the next extent in the extent stack. Use the CanRedoExtent property to determine whether the extent can be redone.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#undoExtent()
,
com.esri.arcgis.publishercontrols.IARMap
Object getInternalObject() throws IOException, AutomationException
Use the InternalObject property to access the underlying IMap object. This property is always inaccessible.
Getting the InternalObject property will return an error if no license is available and if the currently loaded document was not published with permission to access InternalObjects. Use the IARControl::HasDocumentPermission method to determine this.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getBookmarkCount() throws IOException, AutomationException
The BookmarkCount property returns the number of spatial bookmarks within the ARMap.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#centerAtBookmark(java.lang.Object)
,
com.esri.arcgis.publishercontrols.IARMap#getBookmarkName(int)
,
com.esri.arcgis.publishercontrols.IARMap#zoomToBookmark(java.lang.Object)
String getBookmarkName(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void zoomToBookmark(Object vBookmarkID) throws IOException, AutomationException
Zooms to the spatial bookmark to make it visible on the display as the new viewing extent, changing the MapScale.
Specify a BookmarkName or a zero-based index to zoom to a spatial bookmark. For example, to zoom to the first spatial bookmark in the collection, pass an index of 0, and to zoom to the last spatial bookmark in the layer collection, pass an index of (BookmarkCount - 1).
vBookmarkID
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#centerAtBookmark(java.lang.Object)
,
com.esri.arcgis.publishercontrols.IARMap#getBookmarkName(int)
,
com.esri.arcgis.publishercontrols.IARMap#getBookmarkCount()
void centerAtBookmark(Object vBookmarkID) throws IOException, AutomationException
Centers the spatial bookmark on the display to make it visible. The extent of the ARMap will change, but the MapScale will remain the same.
Specify a BookmarkName or a zero-based index to center a spatial bookmark. For example, to center the first spatial bookmark in the collection, pass an index of 0, and to center the last spatial bookmark in the layer collection, pass an index of (BookmarkCount - 1).
vBookmarkID
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#getBookmarkName(int)
,
com.esri.arcgis.publishercontrols.IARMap#getBookmarkCount()
,
com.esri.arcgis.publishercontrols.IARMap#zoomToBookmark(java.lang.Object)
void zoomToFullExtent() throws IOException, AutomationException
Changes the ARMap's viewing extent to show the full extent of all data layers, causing the MapScale property to change. The ZoomToFullExtent method automatically refreshes the ARMap display area.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.publishercontrols.IARMap#setExtent(double, double, double, double)
,
com.esri.arcgis.publishercontrols.IARMap#getFullExtent(double[], double[], double[], double[])
,
com.esri.arcgis.publishercontrols.IARMap#getExtent(double[], double[], double[], double[])
Object getCustomProperty() throws IOException, AutomationException
Use the CustomProperty to associate any useful data with the ARMap. This is similar to a 'Tag' property, and can be use to store strings, numbers and objects.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCustomProperty(Object pVal) throws IOException, AutomationException
pVal
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IARFeatureCursor searchARFeatures(IARSearchDef pSearchDef) throws IOException, AutomationException
Searches the ARMap based upon an attribute or spatial query as defined by the ArcReaderSearchDef. Only ARLayer objects with a Searchable property set to true within the ARMap will be searched.
Use the ARFeatureCursor to retrieve each ARFeature one at a time. If there are no ARFeature objects matching the query the first IARFeatureCursor::NextARFeature will return nothing.
The SearchARFeatures method will return an error if the currently loaded document was not published with permission to QueryFeatures. Use the IARControl::HasDocumentPermission method to determine this.
If there is an error with the query, such as ill-formed SQL, the error returned will contain an error description from the underlying database.
pSearchDef
- A reference to a com.esri.arcgis.controls.IARSearchDef (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |