|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMap
Provides access to members that control the map.
The IMap interface is a starting point for many of the tasks one does with a map. For example, you can use IMap to add, delete, and access map layers containing data from various sources, including feature layers and graphics layers; associate map surround objects (legends, scale bars, and so on) with the map; access the various properties of a map, including the area of interest, the current map units, and the spatial reference; select features and access the Map object’s current selection.
Every map document contains at least one Map object. Only one Map can have focus at a time, and this Map is called the focus map. IMxDocument provides access to all of the Map objects loaded in the document; IMxDocument::FocusMap returns a reference (IMap) to the Map currently with focus, and IMxDocument::Maps returns a reference (IMaps) to the entire collection of Map objects. A map document can contain any number of Map objects —the focus map always represents the data view.
The Map object, manages a collection of Layer objects. Each layer has a spatial reference. A spatial reference defines a resolution (1/precision) and a coordinate system. The map coordinate system is automatically set to the coordinate system of the first layer loaded in the map and the resolution (1/precision) is calculated based on the union of all the layers extents.
Use the IMap interface to display data from various data sources.
The IMap interface is a starting point for many of the tasks one does with a Map. For example, use IMap to add, delete, and access map layers containing data from various sources including feature layers and graphics layers; associate map surround objects (legends, scale bars, etc) with the Map; access the various properties of a Map including the area of interest, the current map units, and the spatial reference; select features and access the Map's current selection.
com.esri.arcgis.carto.IMxDocument
,
IMaps
Method Summary | |
---|---|
void |
addLayer(ILayer layer)
Adds a layer to the map. |
void |
addLayers(IEnumLayer layers,
boolean autoArrange)
Adds multiple layers to the map, arranging them nicely if specified. |
void |
addMapSurround(IMapSurround mapSurround)
Adds a map surround to the map. |
void |
clearLayers()
Removes all layers from the map. |
void |
clearMapSurrounds()
Removes all map surrounds from the map. |
void |
clearSelection()
Clears the map selection. |
double |
computeDistance(IPoint p1,
IPoint p2)
Computes the distance between two points on the map and returns the result. |
IMapSurround |
createMapSurround(IUID clsid,
IMapSurround optionalStyle)
Create and initialize a map surround. |
void |
delayDrawing(boolean delay)
Suspends drawing. |
void |
delayEvents(boolean delay)
Used to batch operations together to minimize notifications. |
void |
deleteLayer(ILayer layer)
Deletes a layer from the map. |
void |
deleteMapSurround(IMapSurround mapSurround)
Deletes a map surround from the map. |
ILayer |
getActiveGraphicsLayer()
The active graphics layer. |
IAnnotateMap |
getAnnotationEngine()
The annotation (label) engine the map will use. |
IBarrierCollection |
getBarriers(IEnvelope pExtent)
The list of barriers and their weight for labeling. |
IGraphicsLayer |
getBasicGraphicsLayer()
The basic graphics layer. |
IBorder |
getClipBorder()
An optional border drawn around ClipGeometry. |
IGeometry |
getClipGeometry()
A shape that layers in the map are clipped to. |
String |
getDescription()
Description of the map. |
int |
getDistanceUnits()
The distance units for the map. |
ISelection |
getFeatureSelection()
The feature selection for the map. |
ILayer |
getLayer(int index)
The layer at the given index. |
int |
getLayerCount()
Number of layers in the map. |
IEnumLayer |
getLayers(IUID uid,
boolean recursive)
The layers in the map of the type specified in the uid. |
double |
getMapScale()
The scale of the map as a representative fraction. |
IMapSurround |
getMapSurround(int index)
The map surround at the given index. |
int |
getMapSurroundCount()
Number of map surrounds associated with the map. |
int |
getMapUnits()
The units for the map. |
String |
getName()
Name of the map. |
void |
getPageSize(double[] widthInches,
double[] heightInches)
Gets the page size for the map. |
double |
getReferenceScale()
The reference scale of the map as a representative fraction. |
int |
getSelectionCount()
Number of selected features. |
ISpatialReference |
getSpatialReference()
The spatial reference of the map. |
boolean |
isExpanded()
Indicates if the Map is expanded. |
boolean |
isFramed()
Indicates if map is drawn in a frame rather than on the whole window. |
boolean |
isSpatialReferenceLocked()
Indicates whether the spatial reference is prevented from being changed. |
boolean |
isUseSymbolLevels()
Indicates if the Map draws using symbol levels. |
void |
moveLayer(ILayer layer,
int toIndex)
Moves a layer to another position. |
void |
recalcFullExtent()
Forces the full extent to be recalculated. |
void |
selectByShape(IGeometry shape,
ISelectionEnvironment env,
boolean justOne)
Selects features in the map given a shape and a selection environment (optional). |
void |
selectFeature(ILayer layer,
IFeature feature)
Selects a feature. |
void |
setActiveGraphicsLayerByRef(ILayer graphicsLayer)
The active graphics layer. |
void |
setAnnotationEngineByRef(IAnnotateMap annotateMap)
The annotation (label) engine the map will use. |
void |
setAreaOfInterest(IEnvelope rhs1)
Area of interest for the map. |
void |
setClipBorder(IBorder border)
An optional border drawn around ClipGeometry. |
void |
setClipGeometry(IGeometry clipGeometry)
A shape that layers in the map are clipped to. |
void |
setDescription(String descr)
Description of the map. |
void |
setDistanceUnits(int unitsCode)
The distance units for the map. |
void |
setExpanded(boolean expanded)
Indicates if the Map is expanded. |
void |
setFeatureSelectionByRef(ISelection selection)
The feature selection for the map. |
void |
setIsFramed(boolean flag)
Indicates if map is drawn in a frame rather than on the whole window. |
void |
setMapScale(double scaleRF)
The scale of the map as a representative fraction. |
void |
setMapUnits(int unitsCode)
The units for the map. |
void |
setName(String name)
Name of the map. |
void |
setPageSize(double widthInches,
double heightInches)
Sets the page size for the map (optional). |
void |
setReferenceScale(double scaleRF)
The reference scale of the map as a representative fraction. |
void |
setSpatialReferenceByRef(ISpatialReference spatialRef)
The spatial reference of the map. |
void |
setSpatialReferenceLocked(boolean locked)
Indicates whether the spatial reference is prevented from being changed. |
void |
setUseSymbolLevels(boolean flag)
Indicates if the Map draws using symbol levels. |
Method Detail |
---|
String getName() throws IOException, AutomationException
Each map has a name controlled by this property. The default name of the first map is 'Layers' and new maps get the name 'New Data Frame', 'New Data Frame 2' and so on. The name of each map appears in the Display and Source content views in the table of contents.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setName(String name) throws IOException, AutomationException
Each map has a name controlled by this property. The default name of the first map is 'Layers' and new maps get the name 'New Data Frame', 'New Data Frame 2' and so on. The name of each map appears in the Display and Source content views in the table of contents.
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getDescription() throws IOException, AutomationException
Each map has a description controlled by this property. Maps do not have a description by default.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDescription(String descr) throws IOException, AutomationException
Each map has a description controlled by this property. Maps do not have a description by default.
descr
- The descr (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAreaOfInterest(IEnvelope rhs1) throws IOException, AutomationException
rhs1
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ILayer.getAreaOfInterest()
int getLayerCount() throws IOException, AutomationException
LayerCount returns the number of layers in the map that implement IDataLayer.
LayerCount does not include the basic graphics layer (CompositeGraphicLayer) that each map contains nor does it return the graphic layers that can be created into this composite layer.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IDataLayer
ILayer getLayer(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumLayer getLayers(IUID uid, boolean recursive) throws IOException, AutomationException
uid
- A reference to a com.esri.arcgis.system.IUID (in, optional, pass 0 if not required)recursive
- The recursive (in, optional, pass true if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getMapSurroundCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.getMapSurround(int)
,
IMap.addMapSurround(com.esri.arcgis.carto.IMapSurround)
IMapSurround getMapSurround(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getMapUnits() throws IOException, AutomationException
MapControl m = new MapControl();IMap pMap;ISpatialReference pSpatialReference;IProjectedCoordinateSystem pProjectedCoordinateSystem;ILinearUnit pLinearUnit;ISpatialReferenceInfo pSpatialReferenceInfo;
pMap = m.getMap();System.out.println(pMap.getMapUnits());pSpatialReference = pMap.getSpatialReference();pProjectedCoordinateSystem =new IProjectedCoordinateSystemProxy(pSpatialReference);pLinearUnit = pProjectedCoordinateSystem.getCoordinateUnit();
pSpatialReferenceInfo =
new ISpatialReferenceInfoProxy(pLinearUnit);System.out.println(pSpatialReferenceInfo.getFactoryCode());
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMapUnits(int unitsCode) throws IOException, AutomationException
unitsCode
- A com.esri.arcgis.system.esriUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getDistanceUnits() throws IOException, AutomationException
The units - for example, feet, miles, meters, kilometers - ArcMap uses to report measurements, dimensions of shapes, and distance tolerances and offsets.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDistanceUnits(int unitsCode) throws IOException, AutomationException
unitsCode
- A com.esri.arcgis.system.esriUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISpatialReference getSpatialReference() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSpatialReferenceByRef(ISpatialReference spatialRef) throws IOException, AutomationException
spatialRef
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getMapScale() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setMapScale(double scaleRF) throws IOException, AutomationException
scaleRF
- The scaleRF (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getReferenceScale() throws IOException, AutomationException
All symbols are drawn relative to the scale value set in this property. By default this value is zero. Symbol size is true at the reference scale. When the reference scale is 0, symbols are always drawn at the same size regardless of the map scale (ScaleRatio). For example, if you set your labels to display with 10 pt font, they will appear as 10 pt text at any map scale. When the reference scale is greater than 0, symbols are drawn at a size relative to the map scale. For example, if you set your labels to display with 10 pt font and have a reference scale of 10,000, the labels will appear as 10 pt only at that map scale; as you zoom in, the size of all symbols increases because the size of the symbols is based on the smaller scale.
The ReferenceScale property is a shortcut to IDisplayTransformation::ReferenceScale.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setReferenceScale(double scaleRF) throws IOException, AutomationException
scaleRF
- The scaleRF (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isFramed() throws IOException, AutomationException
When creating a custom application, if you want the display to take over the window it's drawing in, set IsFramed to FALSE. This will add scrollbars (IScreenDisplay::UseScrollBars = TRUE) as necessary and keeps the device frame in sync with the window extent. Setting IsFramed to TRUE means that the display is drawing on some extent within the window. In this case, it won't show scrollbars and it won't automatically update the device frame.
For example, in the ArcMap application, in layout view where each Map resides inside a separate MapFrame, each Map has it IsFramed property set to TRUE. In data view, the opposite is true, a Map's display fits the entire window; in this view, all Map's have IsFramed set to FALSE, not just the focus map.
The IsFramed property also sets the IsFirstCacheTransparent property. When a Map is drawing in layout view, the PageLayout object has its ScreenDisplay and each Map has its own separate ScreenDisplay. This means that the layout has it's display cache(s) and the maps have their own. If the bottom cache of each map was opaque, you wouldn't be able to see through a map onto layout elements below it. Setting IsFirstCacheTransparent on the maps in layout view lets you see through the maps.
This property is really a shortcut to IScreenDisplay::IsFramed.
If you are working with Map's inside of ArcMap these settings should not be touched. Only use this property when building a low level appliation that uses a display to draw on a frame on a window.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.com.esri.arcgis.carto.IScreenDisplay
void setIsFramed(boolean flag) throws IOException, AutomationException
flag
- The flag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IGeometry getClipGeometry() throws IOException, AutomationException
Use the ClipGeometry property to shape the area the Map is drawn in. For example, if you had a map of the United States that contained many layers, you could set the Map's ClipGeometry equal to the geometry of a particular state thereby telling the map to only draw the map data falling within the particular state's area.
The scripts below demonstrate this.
In the ArcMap user interface, the same functionality is available on the map's data frame properties page. Right-click on a map in the table of contents and select Properties. Select the Data Frame tab and look at 'Clip to Shape'. Under 'Specify a Shape', select 'Outline of Data Graphics'. You can also specify a 'Custom Extent' or use the 'Outline of Features'.
The ClipBorder property puts a border around the cut out.
By default there is no clip geometry and no clip border.
MapControl pMapControl = new MapControl();IMap pMap;IViewManager pViewManager;IEnumElement pEnumElement;IElement pElement;IActiveView pActiveView;IBorder pBorder;
pMap = pMapControl.getMap();
pViewManager = new IViewManagerProxy(pMap);
pEnumElement = new IEnumElementProxy( pViewManager.getElementSelection());
pEnumElement.reset();
pElement = pEnumElement.next();
if(pElement != null){
if(pElement.getGeometry().getGeometryType() == esriGeometryType.esriGeometryPolygon){
pBorder = new SymbolBorder();
pMap.setClipGeometry(pElement.getGeometry());
pMap.setClipBorder(pBorder);
pMapControl.getActiveView().refresh();
}
}
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.getClipBorder()
void setClipGeometry(IGeometry clipGeometry) throws IOException, AutomationException
clipGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addLayer(ILayer layer) throws IOException, AutomationException
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.addLayers(com.esri.arcgis.carto.IEnumLayer, boolean)
,
IMap.getLayerCount()
void addLayers(IEnumLayer layers, boolean autoArrange) throws IOException, AutomationException
layers
- A reference to a com.esri.arcgis.carto.IEnumLayer (in)autoArrange
- The autoArrange (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.addLayer(com.esri.arcgis.carto.ILayer)
,
IMap.getLayerCount()
void deleteLayer(ILayer layer) throws IOException, AutomationException
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void moveLayer(ILayer layer, int toIndex) throws IOException, AutomationException
MapControl pMapControl = new MapControl();IMap pMap = pMapControl.getMap();ILayer pLayer = pMap.getLayer(0);pLayer = pMap.moveLayer(pLayer, pMap.getLayerCount() - 1);
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)toIndex
- The toIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearLayers() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMapSurround createMapSurround(IUID clsid, IMapSurround optionalStyle) throws IOException, AutomationException
clsid
- A reference to a com.esri.arcgis.system.IUID (in)optionalStyle
- A reference to a com.esri.arcgis.carto.IMapSurround (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.createMapSurround(com.esri.arcgis.system.IUID, com.esri.arcgis.carto.IMapSurround)
,
IMap.deleteMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.addMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMapFrame.createSurroundFrame(com.esri.arcgis.system.IUID, com.esri.arcgis.carto.IMapSurround)
,
IMap.clearMapSurrounds()
void addMapSurround(IMapSurround mapSurround) throws IOException, AutomationException
mapSurround
- A reference to a com.esri.arcgis.carto.IMapSurround (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.createMapSurround(com.esri.arcgis.system.IUID, com.esri.arcgis.carto.IMapSurround)
,
IMap.deleteMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.addMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.clearMapSurrounds()
void deleteMapSurround(IMapSurround mapSurround) throws IOException, AutomationException
mapSurround
- A reference to a com.esri.arcgis.carto.IMapSurround (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.createMapSurround(com.esri.arcgis.system.IUID, com.esri.arcgis.carto.IMapSurround)
,
IMap.deleteMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.addMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.clearMapSurrounds()
void clearMapSurrounds() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.createMapSurround(com.esri.arcgis.system.IUID, com.esri.arcgis.carto.IMapSurround)
,
IMap.deleteMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.addMapSurround(com.esri.arcgis.carto.IMapSurround)
,
IMap.clearMapSurrounds()
double computeDistance(IPoint p1, IPoint p2) throws IOException, AutomationException
p1
- A reference to a com.esri.arcgis.geometry.IPoint (in)p2
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.getDistanceUnits()
,
IMap.getMapUnits()
IGraphicsLayer getBasicGraphicsLayer() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.getActiveGraphicsLayer()
ILayer getActiveGraphicsLayer() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setActiveGraphicsLayerByRef(ILayer graphicsLayer) throws IOException, AutomationException
graphicsLayer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IBorder getClipBorder() throws IOException, AutomationException
If a ClipGeometry has been set, you have the option of drawing a border around the clipped map. Use the ClipBorder propety to specify the type of border drawn.
Use the ClipGeometry property to shape the area the Map is drawn in. For example, if you had a map of the United States that contained many layers, you could set the Map's ClipGeometry equal to the geometry of a particular state thereby telling the map to only draw the map data falling within the particular state's area.
By default there is no clip geometry or clip border.
MapControl pMapControl = new MapControl();IMap pMap;IViewManager pViewManager;IEnumElement pEnumElement;IElement pElement;IActiveView pActiveView;IBorder pBorder;
pMap = pMapControl.getMap();pViewManager = new IViewManagerProxy(pMap);pEnumElement = new IEnumElementProxy( pViewManager.getElementSelection());pEnumElement.reset();
pElement = pEnumElement.next();if(pElement != null){if(pElement.getGeometry().getGeometryType() ==esriGeometryType.esriGeometryPolygon){pBorder = new SymbolBorder();pMap.setClipGeometry(pElement.getGeometry());pMap.setClipBorder(pBorder);pMapControl.getActiveView().refresh();}}
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IMap.getClipGeometry()
void setClipBorder(IBorder border) throws IOException, AutomationException
border
- A reference to a com.esri.arcgis.carto.IBorder (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectFeature(ILayer layer, IFeature feature) throws IOException, AutomationException
Adds the feature to the feature layer's selection set. For example, the Editor's 'Create New Feature' task uses this method to select the new feature it has just created. This method also calls IActiveViewEvents::SelectionChanged to notify all listeners of the event.
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)feature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getSelectionCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearSelection() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISelection getFeatureSelection() throws IOException, AutomationException
ArcMap has two different selections, a feature selection and an element selection. Two different objects represent these selections and both implement the ISelection interface. The feature selection object additionally implements IEnumFeature and the element selection object IEnumElement. The ISelection interface is used for clipboard type operations and the IEnum interfaces are used to loop through the items in the collection.
When you ask for the FeatureSelection from IMap you are returned an ISelection but you can perform a query interface for IEnumFeature and usually do so. However, if you get the selection via IActiveView::Selection, the selection can either be an element selection or a feature selection depending on which one is currently active - only one of the selections can be active at a time. Use FeatureSelection to ensure a reference to the correct selection.
IEnumFeature works on all of the FeatureLayers as a whole. Each FeatureLayer has a ISelectionSet and IEnumFeature steps through all of these as though there was only one. Because IEnumFeature works with all the FeatureLayers, you cannot use it to loop through the features belonging to just one FeatureLayer.
Note, only the shape field is guaranteed with the selection. This is the default and exists for performance reasons. The IMap::FeatureSelection property is typically used to draw the map selection, not access feature attributes. This is particularly noticeable with shapefiles and coverage but also in geodatabases if the selection is large enough. Use IEnumFeatureSetup::AllFields to set a flag indicating all fields be returned with the selection. If you want to loop through the map selection to perform an operation, it is typically best to access each layer's selection rather than the entire map's selection. See the example for a sample of each.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IViewManager.setElementSelectionByRef(com.esri.arcgis.carto.ISelection)
,
IActiveView.getSelection()
void setFeatureSelectionByRef(ISelection selection) throws IOException, AutomationException
selection
- A reference to a com.esri.arcgis.carto.ISelection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectByShape(IGeometry shape, ISelectionEnvironment env, boolean justOne) throws IOException, AutomationException
SelectByShape searches for features in all layers of type IFeatureLayer, that are intersected by the input shape. Each layer is searched only if its IFeatureLayer::Selectable property is set to TRUE.
The ISelectionEnvironment parameter determines the selection outcome. For example, a new selection may be created or the features found may be added to the existing feature selection. See the esriSelectionOption enumeration for the different selection options. The application's selection environment is available via IMxApplication::SelectionEnvironment.
The justOne parameter tells the search to stop once it has found one feature.
After the search is complete, IActiveViewEvents::SelectionChanged is called to notify all listeners the selection has changed.
shape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)env
- A reference to a com.esri.arcgis.carto.ISelectionEnvironment (in)justOne
- The justOne (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void delayEvents(boolean delay) throws IOException, AutomationException
All calls made to IActiveViewEvents::SelectionChanged are ignored when DelayEvents is set to TRUE. The event is automatically fired when DelayEvents is set back to FALSE to ensure that clients ultimately receive the event.
This method is typically used when changing the Map's selection. Without DelayEvents set to TRUE, the SelectionChanged event would fire each time a feature is added or removed; instead, DelayEvents is used so that only one notification is sent when the entire selection operation is complete.
delay
- The delay (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setPageSize(double widthInches, double heightInches) throws IOException, AutomationException
widthInches
- The widthInches (in)heightInches
- The heightInches (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void getPageSize(double[] widthInches, double[] heightInches) throws IOException, AutomationException
widthInches
- The widthInches (out: use single element array)heightInches
- The heightInches (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IBarrierCollection getBarriers(IEnvelope pExtent) throws IOException, AutomationException
pExtent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setUseSymbolLevels(boolean flag) throws IOException, AutomationException
flag
- The flag (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isUseSymbolLevels() throws IOException, AutomationException
Determines whether Symbol Level Drawing is enabled for a Map.
To set up Symbol Level Drawing:
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setExpanded(boolean expanded) throws IOException, AutomationException
expanded
- The expanded (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isExpanded() throws IOException, AutomationException
Use this property to expand or collapse the Map in the table of contents. By default a Map is expanded.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAnnotationEngineByRef(IAnnotateMap annotateMap) throws IOException, AutomationException
annotateMap
- A reference to a com.esri.arcgis.carto.IAnnotateMap (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAnnotateMap getAnnotationEngine() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void recalcFullExtent() throws IOException, AutomationException
Recalculates the Map's full extent so that all of the Map's feature layers, fall within its bounds.
AddLayer, AddLayers, and DeleteLayer all call RecalcFullExtent automatically.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void delayDrawing(boolean delay) throws IOException, AutomationException
delay
- The delay (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSpatialReferenceLocked(boolean locked) throws IOException, AutomationException
locked
- The locked (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isSpatialReferenceLocked() throws IOException, AutomationException
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 |