|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.carto.BasemapSubLayer
public class BasemapSubLayer
Wrapper for layers in the basemap.
The BasemapSubLayer is a wrapper around the real internal layer and provides only focused access to the internal properties of the real layer in order to maintain high performance display.
Constructor Summary | |
---|---|
BasemapSubLayer(Object obj)
Construct a BasemapSubLayer using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
boolean |
connect(IName pOptRepairName)
Connects the layer to its data source. |
void |
disconnect()
Disconnects the data from the layer. |
void |
draw(int drawPhase,
IDisplay display,
ITrackCancel trackCancel)
Draws the layer to the specified display for the given draw phase. |
boolean |
equals(Object o)
Compare this object with another |
void |
expandRegionForSymbols(IDisplay pDisplay,
IGeometry pRegion)
Enlarges the specified region if necessary to account for the symbology sizes. |
IEnvelope |
getAreaOfInterest()
The default area of interest for the layer. |
int |
getConversionStatus()
Indicates the conversion status of a given layer. |
int |
getCount()
Number of layers in the collection. |
IName |
getDataSourceName()
Name of the data object for the layer. |
IEnvelope |
getExtent()
The extent of the GeoDataset. |
int |
getLargeImage()
Large image that represents the layer. |
int |
getLargeSelectedImage()
Large image that represents the layer when it is selected. |
double |
getLastMaximumScale()
Last maximum scale setting used by layer. |
double |
getLastMinimumScale()
Last minimum scale setting used by layer. |
ILayer |
getLayer()
Gets the contained layer. |
ILayer |
getLayer(int index)
Layer in the collection at the specified index. |
ILegendGroup |
getLegendGroup(int index)
Legend group at the specified index. |
int |
getLegendGroupCount()
Number of legend groups contained by the object. |
ILegendItem |
getLegendItem()
Optional. |
double |
getMaximumScale()
Maximum scale (representative fraction) at which the layer will display. |
double |
getMinimumScale()
Minimum scale (representative fraction) at which the layer will display. |
String |
getName()
Layer name. |
String |
getRelativeBase()
Base path used when storing relative path names. |
int |
getSmallImage()
Small image that represents the layer. |
int |
getSmallSelectedImage()
Small image that represents the layer when it is selected. |
ISpatialReference |
getSpatialReference()
The spatial reference of the GeoDataset. |
int |
getSupportedDrawPhases()
Supported draw phases. |
String |
getTipText(double x,
double y,
double tolerance)
Map tip text at the specified location. |
int |
hashCode()
the hashcode for this object |
IArray |
identify(IGeometry pGeom)
Identifies objects at the specified location. |
IArray |
identify(IGeometry pGeom,
ITrackCancel pTrackCancel)
Identifies objects at the specified location. |
String |
ILayerGeneralProperties_getLayerDescription()
Description for the layer. |
boolean |
inWorkspace(IWorkspace workspace)
Returns TRUE if the layer is in the specified workspace. |
boolean |
isCached()
Indicates if the layer needs its own display cache. |
boolean |
isDataSourceSupported(IName name)
Indicates if the specified data object name is supported by the layer. |
boolean |
isExpanded()
Indicates if the layer is expanded in the TOC. |
boolean |
isScaleRangeReadOnly()
Indicates if the minimum and maximum scale range values are read-only. |
boolean |
isShowTips()
Indicates if the layer shows map tips. |
boolean |
isSymbolsAreGraduated()
Indicates if symbols are graduated. |
boolean |
isValid()
Indicates if the layer is currently valid. |
boolean |
isVisible()
Indicates if the layer is currently visible. |
void |
setAreaOfInterest(IEnvelope aoi)
The default area of interest for the layer. |
void |
setCached(boolean cached)
Indicates if the layer needs its own display cache. |
void |
setDataSourceName(IName name)
Name of the data object for the layer. |
void |
setExpanded(boolean expanded)
Indicates if the layer is expanded in the TOC. |
void |
setLayerDescription(String text)
Description for the layer. |
void |
setMaximumScale(double maxScale)
Maximum scale (representative fraction) at which the layer will display. |
void |
setMinimumScale(double minScale)
Minimum scale (representative fraction) at which the layer will display. |
void |
setName(String name)
Layer name. |
void |
setRelativeBase(String basePath)
Base path used when storing relative path names. |
void |
setScale(double rhs1)
The current scale of the display. |
void |
setShowTips(boolean show)
Indicates if the layer shows map tips. |
void |
setSpatialReferenceByRef(ISpatialReference rhs1)
Spatial reference for the layer. |
void |
setSymbolsAreGraduated(boolean symbolsAreGraduated)
Indicates if symbols are graduated. |
void |
setVisible(boolean visible)
Indicates if the layer is currently visible. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public BasemapSubLayer(Object obj) throws IOException
obj
to BasemapSubLayer
. *
BasemapSubLayer o = (BasemapSubLayer)obj; // will not work
BasemapSubLayer o = new BasemapSubLayer(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
BasemapSubLayer theBasemapSubLayer = (BasemapSubLayer) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public ILayer getLayer() throws IOException, AutomationException
getLayer
in interface IBasemapSubLayer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getConversionStatus() throws IOException, AutomationException
getConversionStatus
in interface IBasemapSubLayer
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getSpatialReference() throws IOException, AutomationException
This property is read only. For layers, when the first layer is added to ArcMap, its spatial reference is read by this property, and the map is set to this spatial reference.
Instances of the esriCarto.GroupLayer class will return null for this property, as a group layer can contain multiple datasets with different spatial references.
Modifications to a spatial reference returned by this property will not be persisted. To modify the spatial reference of a dataset, the IGeoDatasetSchemaEdit and IGeoDatasetSchemaEdit2 interfaces should be used.
getSpatialReference
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getExtent() throws IOException, AutomationException
The IGeoDataset::Extent property returns an envelope representing the maximum extent of data which has been stored in the dataset.
Consider the following scenario. A new feature class has features added to it. The IGeoDataset::Extent is then requested and an envelope is returned. The extents of the envelope returned are represented by the red box in the image below.
If a portion of the features were then deleted and the extent is again requested an envelope with the exact same extents as during the first request would be returned (see image below). This is because the deletion of features does not shrink the extent. However all additions of features outside the red box would increase the envelope returned to encompass the newly added features.
If you would like to update the IGeoDataset::Extent property to reflect the current features in your dataset please see IFeatureClassManage::UpdateExtent (also see IFeatureClassLoad). In the image below the extent has been updated and a new envelope is being returned.
ESRI's GroupLayer implements this property differently from most other layer coclasses. When you instantiate a new GroupLayer, this property will return a valid envelope with zero height and width. With most other newly instantiated layers (for example FeatureLayer, RasterLayer, TinLayer), this property initally returns Nothing.
getExtent
in interface IGeoDataset
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getCount() throws IOException, AutomationException
Returns the count, or number of layers. Use the methods in the IGroupLayer interface to manage the contents of GroupLayers.
getCount
in interface ICompositeLayer
getCount
in interface ICompositeLayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILayer getLayer(int index) throws IOException, AutomationException
getLayer
in interface ICompositeLayer
getLayer
in interface ICompositeLayer2
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isExpanded() throws IOException, AutomationException
isExpanded
in interface ICompositeLayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setExpanded(boolean expanded) throws IOException, AutomationException
setExpanded
in interface ICompositeLayer2
expanded
- The expanded (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getLastMinimumScale() throws IOException, AutomationException
getLastMinimumScale
in interface ILayerGeneralProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getLastMaximumScale() throws IOException, AutomationException
getLastMaximumScale
in interface ILayerGeneralProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String ILayerGeneralProperties_getLayerDescription() throws IOException, AutomationException
ILayerGeneralProperties_getLayerDescription
in interface ILayerGeneralProperties
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setLayerDescription(String text) throws IOException, AutomationException
setLayerDescription
in interface ILayerGeneralProperties
text
- The text (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getLegendGroupCount() throws IOException, AutomationException
The number of legend groups is determined by the implementation of the renderer, consequently this property is read only. For example, SimpleRenderer has one group, while a BiUniqueValueRenderer has any number of groups.
getLegendGroupCount
in interface ILegendInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILegendGroup getLegendGroup(int index) throws IOException, AutomationException
getLegendGroup
in interface ILegendInfo
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILegendItem getLegendItem() throws IOException, AutomationException
Layer or renderer legend information is further formatted for display in ArcMap legends. A renderer can override this formatting by returning a LegendItem for this property. ESRI renderers typically do not return anything for this property. With this configuration, legend formatting becomes a user or developer choice on the legend object.
getLegendItem
in interface ILegendInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isSymbolsAreGraduated() throws IOException, AutomationException
Indicates whether the symbols used for a layer or renderer's legend vary by size.
For example the proportional symbol renderer returns True for this property.
You can use this property to distinguish between a layer symbolized with graduated color or graduated symbol type layer symbology. Both of these symbolizations use a ClassBreaksRenderer, but only a graduated symbol symbolization will return True for this property.
isSymbolsAreGraduated
in interface ILegendInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSymbolsAreGraduated(boolean symbolsAreGraduated) throws IOException, AutomationException
setSymbolsAreGraduated
in interface ILegendInfo
symbolsAreGraduated
- The symbolsAreGraduated (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IArray identify(IGeometry pGeom) throws IOException, AutomationException
When the IIdentify interface is on a map layer, the Identify method returns an array of FeatureIdentifyObject objects.
On a FeatureIdentifyObject, you can do a QI to the IIdentifyObj interface to get more information about the identified feature. The IIdentifyObj interface returns the window handle, layer, and name of the feature; it has methods to flash the feature in the display and to display a context menu at the Identify location.
This method performs an identify operation with the provided geometry. When identifying layers, typically a small envelope is passed in rather than a point to account for differences in the precision of the display and the feature geometry.
identify
in interface IIdentify
pGeom
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IArray identify(IGeometry pGeom, ITrackCancel pTrackCancel) throws IOException, AutomationException
When the IIdentify interface is on a map layer, the Identify method returns an array of FeatureIdentifyObject objects.
On a FeatureIdentifyObject, you can do a QI to the IIdentifyObj interface to get more information about the identified feature. The IIdentifyObj interface returns the window handle, layer, and name of the feature; it has methods to flash the feature in the display and to display a context menu at the Identify location.
This method performs an identify operation with the provided geometry. When identifying layers, typically a small envelope is passed in rather than a point to account for differences in the precision of the display and the feature geometry.
identify
in interface IIdentify2
pGeom
- A reference to a com.esri.arcgis.geometry.IGeometry (in)pTrackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setScale(double rhs1) throws IOException, AutomationException
setScale
in interface IIdentify2
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IName getDataSourceName() throws IOException, AutomationException
getDataSourceName
in interface IDataLayer
getDataSourceName
in interface IDataLayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setDataSourceName(IName name) throws IOException, AutomationException
setDataSourceName
in interface IDataLayer
setDataSourceName
in interface IDataLayer2
name
- A reference to a com.esri.arcgis.system.IName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isDataSourceSupported(IName name) throws IOException, AutomationException
isDataSourceSupported
in interface IDataLayer
isDataSourceSupported
in interface IDataLayer2
name
- A reference to a com.esri.arcgis.system.IName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean connect(IName pOptRepairName) throws IOException, AutomationException
connect
in interface IDataLayer
connect
in interface IDataLayer2
pOptRepairName
- A reference to a com.esri.arcgis.system.IName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getRelativeBase() throws IOException, AutomationException
The RelativeBase property is used internally when persisting and loading documents with a relative path. When a document has been fully loaded the path is realized to a complete path.
getRelativeBase
in interface IDataLayer
getRelativeBase
in interface IDataLayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setRelativeBase(String basePath) throws IOException, AutomationException
setRelativeBase
in interface IDataLayer
setRelativeBase
in interface IDataLayer2
basePath
- The basePath (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void disconnect() throws IOException, AutomationException
disconnect
in interface IDataLayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean inWorkspace(IWorkspace workspace) throws IOException, AutomationException
inWorkspace
in interface IDataLayer2
workspace
- A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void expandRegionForSymbols(IDisplay pDisplay, IGeometry pRegion) throws IOException, AutomationException
expandRegionForSymbols
in interface ILayerSymbologyExtents
pDisplay
- A reference to a com.esri.arcgis.display.IDisplay (in)pRegion
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSmallImage() throws IOException, AutomationException
The icon used to represent the layer in ArcCatalog's 'List' and 'Details' views.
getSmallImage
in interface ILayerInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSmallSelectedImage() throws IOException, AutomationException
The icon used to represent the layer when it is selected in ArcCatalog's 'List' and 'Details' views.
getSmallSelectedImage
in interface ILayerInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getLargeImage() throws IOException, AutomationException
The icon used to represent the layer in ArcCatalog's 'Large Icon' view.
getLargeImage
in interface ILayerInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getLargeSelectedImage() throws IOException, AutomationException
The icon used to represent the layer when it is selected in ArcCatalog's 'Large Icon' view.
getLargeSelectedImage
in interface ILayerInfo
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getName() throws IOException, AutomationException
Use this property to associate a string with a layer.
getName
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setName(String name) throws IOException, AutomationException
setName
in interface ILayer2
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isValid() throws IOException, AutomationException
isValid
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getAreaOfInterest() throws IOException, AutomationException
Returns the spatial-referenced extent of the layer.
getAreaOfInterest
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getMinimumScale() throws IOException, AutomationException
Specifies the minimum scale at which the layer will be displayed. This means that if you zoom out beyond this scale, the layer will not display. For example, specify 1000 to have the layer not display when zoomed out beyond 1:1000.
getMinimumScale
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMinimumScale(double minScale) throws IOException, AutomationException
setMinimumScale
in interface ILayer2
minScale
- The minScale (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getMaximumScale() throws IOException, AutomationException
Specifies the maximum scale at which the layer will be displayed. This means that if you zoom in beyond this scale, the layer will not display. For example, specify 500 to have the layer not display when zoomed in beyond 1:500.
getMaximumScale
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMaximumScale(double maxScale) throws IOException, AutomationException
setMaximumScale
in interface ILayer2
maxScale
- The maxScale (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isVisible() throws IOException, AutomationException
isVisible
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setVisible(boolean visible) throws IOException, AutomationException
setVisible
in interface ILayer2
visible
- The visible (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isShowTips() throws IOException, AutomationException
Indicates whether or not map tips are shown for the layer. If set to True, then map tips will be shown for the layer. You can determine the text that will be shown via TipText. For a FeatureLayer, this text comes from the data for IFeatureLayer::DisplayField.
isShowTips
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setShowTips(boolean show) throws IOException, AutomationException
setShowTips
in interface ILayer2
show
- The show (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getTipText(double x, double y, double tolerance) throws IOException, AutomationException
getTipText
in interface ILayer2
x
- The x (in)y
- The y (in)tolerance
- The tolerance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isCached() throws IOException, AutomationException
This property indicates whether or not the layer requires its own display cache. If this property is True, then the Map will use a separate display cache for the layer so that it can be refreshed indpendently of other layers.
The Map is responsible for cache management. See IScreenDisplay::AddCache for more information on caches.
isCached
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setCached(boolean cached) throws IOException, AutomationException
setCached
in interface ILayer2
cached
- The cached (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getSupportedDrawPhases() throws IOException, AutomationException
Indicates the draw phases supported by the layer (esriDPGeography, esriDPAnnotation, esriDPSelection, or any combination of the three). The supported draw phases are defined by esriDrawPhase. When multiple draw phases are supported, the sum of the constants is used. For example, if SupportedDrawPhases = 3 then the layer supports drawing in the geography and annotation phases.
getSupportedDrawPhases
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSpatialReferenceByRef(ISpatialReference rhs1) throws IOException, AutomationException
This property is only used for map display, setting this property does not change the spatial reference of the layer's underlying data. The ArcGIS framework uses this property to pass the spatial reference from the map to the layer in order to support on-the-fly projection.
setSpatialReferenceByRef
in interface ILayer2
rhs1
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void draw(int drawPhase, IDisplay display, ITrackCancel trackCancel) throws IOException, AutomationException
This method draws the layer to the Display for the specified DrawPhase. Use the TrackCancel object to allow the drawing of the layer to be interrupted by the user.
draw
in interface ILayer2
drawPhase
- A com.esri.arcgis.system.esriDrawPhase constant (in)display
- A reference to a com.esri.arcgis.display.IDisplay (in)trackCancel
- A reference to a com.esri.arcgis.system.ITrackCancel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isScaleRangeReadOnly() throws IOException, AutomationException
Some layer types do not support a writeable MinimumScale or MaximumScale. Use this property to determine whether or not a layer supports this.
isScaleRangeReadOnly
in interface ILayer2
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAreaOfInterest(IEnvelope aoi) throws IOException, AutomationException
setAreaOfInterest
in interface ILayer2
aoi
- A reference to a com.esri.arcgis.geometry.IEnvelope (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 |