com.esri.arcgis.controls
Interface IARLayer

All Superinterfaces:
Serializable
All Known Implementing Classes:
ARLayer, IARLayerProxy

public interface IARLayer
extends Serializable

Provides access to members that control the ARLayer.

Description

The IARLayer interface is a starting point for getting and setting layer properties, and searching for features within the layer.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.


Method Summary
 int getARLayerCount()
          The number of child layers in a group layer.
 IARLayer getChildARLayer(int index)
          The child layer at the specifid index of a group layer.
 Object getCustomProperty()
          A property to associate data with an object.
 String getDescription()
          The description of the layer.
 void getExtent(double[] xMin, double[] yMin, double[] xMax, double[] yMax)
          The extent of the data within the layer.
 Object getInternalObject()
          The internal ArcObjects ILayer object.
 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()
          The name of the layer.
 String getType()
          The description of the type of layer.
 boolean isCached()
          Indicates if the layer has its own display cache.
 boolean isGroupLayer()
          Indicates if the layer is a group of layers behaving like a single layer.
 boolean isHyperlinks()
          Indicates if the layer contains hyperlinks.
 boolean isSearchable()
          Indicates if the layer is searchable (only feature layers are searchable).
 boolean isVisible()
          Indicates if the layer is currently visible.
 IARFeatureSet queryARFeatures(IARSearchDef pSearchDef)
          Searches the layer using a search definition and returns an ARFeatureSet.
 IARFeatureCursor searchARFeatures(IARSearchDef pSearchDef)
          Searches the layer using a search definition and returns an ARFeatureCursor.
 void setCustomProperty(Object pVal)
          A property to associate data with an object.
 void setVisible(boolean visible)
          Indicates if the layer is currently visible.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
The name of the layer.

Description

The Name of the layer. This is the name that appears in the Table of Contents (TOC) on the left hand side of the ArcReaderControl.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isHyperlinks

boolean isHyperlinks()
                     throws IOException,
                            AutomationException
Indicates if the layer contains hyperlinks.

Description

The Hyperlinks property indicates whether any of the layer's field's contains hyperlinks.

Remarks

Hyperlinks will only be accessible if the currently loaded document was published with permission to view hyperlinks. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

setVisible

void setVisible(boolean visible)
                throws IOException,
                       AutomationException
Indicates if the layer is currently visible.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isVisible

boolean isVisible()
                  throws IOException,
                         AutomationException
Indicates if the layer is currently visible.

Description

The Visible property specifies whether the layer is visible in the IARControl::CurrentView.

Remarks

Setting the Visible property will return an error if the currently loaded document was not published with permission to ChangeLayerVisibility. Use the IARControl::HasDocumentPermission method to determine this.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getMaximumScale

double getMaximumScale()
                       throws IOException,
                              AutomationException
Maximum scale (representative fraction) at which the layer will display.

Description

When working with the ArcReaderControl, the MaximumScale property specifies the maximum MapScale at which the layer will be displayed. When working with the ArcReaderGlobeControl, the MaximumScale property specifies the maximum Elevation at which the layer will be displayed. If the layer is not drawn on the screen, the layers check box in the Table of Contents (TOC) will be greyed out.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getMinimumScale

double getMinimumScale()
                       throws IOException,
                              AutomationException
Minimum scale (representative fraction) at which the layer will display.

Description

When working with the ArcReaderControl, the MinimumScale property specifies the minimum MapScale at which the layer will be displayed. When working with the ArcReaderGlobeControl, the MinimumScale property specifies the minimum Elevation at which the layer will be displayed. If the layer is not drawn on the screen, the layers check box in the Table of Contents (TOC) will be greyed out.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isCached

boolean isCached()
                 throws IOException,
                        AutomationException
Indicates if the layer has its own display cache.

Description

The Cached property specifies whether the layer has its own cache for display purposes.

Remarks

A cache is an off screen bitmap representing an application's window. Instead of drawing directly onto the screen, graphics are drawn into caches which are then drawn onto the screen. When an application's window becomes obscured and requires redrawing, it done so from a cache rather than a database. This improves drawing performance as bitmap rendering is faster than reading and displaying data from a database.

In general an ARMap creates a single cache for all of its layers. Setting the Cached property to true creates a private cache for the layer. In this case, the ARMap will create separate caches for any layers above and below the layer.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isGroupLayer

boolean isGroupLayer()
                     throws IOException,
                            AutomationException
Indicates if the layer is a group of layers behaving like a single layer.

Description

The IsGroupLayer property indicates whether the layer is made up of a collection of layers that behave like a single layer.

At the time of publishing a document, several layers may have been gathered together into a group layer, which behaves like a single layer. Suppose you have two layers on a map, with one representing rivers and the other lakes. You might choose to group these layers together and name the resulting layer “water systems”. Using the Visible property to turn off the group layer would turn off all component child layers. As such, the properties of the group layer override any conflicting properties of its child layers. To work with an individual child layer within the group use the ChildARLayer in conjunction with the ARLayerCount property.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The groupLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.publishercontrols.IARLayer#getARLayerCount(), com.esri.arcgis.publishercontrols.IARLayer#getChildARLayer(int)

getARLayerCount

int getARLayerCount()
                    throws IOException,
                           AutomationException
The number of child layers in a group layer.

Description

The ARLayerCount property indicates the number of layers making up a group layer. Use the IsGroupLayer property to determine if a layer is a group layer.

Remarks

The ARLayerCount does not include graphics layers (this may include layers authored in 3rd party software, for example, SketchUp layers).

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
com.esri.arcgis.publishercontrols.IARLayer#getChildARLayer(int), com.esri.arcgis.publishercontrols.IARLayer

getChildARLayer

IARLayer getChildARLayer(int index)
                         throws IOException,
                                AutomationException
The child layer at the specifid index of a group layer.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.controls.IARLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

searchARFeatures

IARFeatureCursor searchARFeatures(IARSearchDef pSearchDef)
                                  throws IOException,
                                         AutomationException
Searches the layer using a search definition and returns an ARFeatureCursor.

Description

Searches the ARLayer based upon an attribute or spatial query as defined by the ArcReaderSearchDef. The ARLayer must be Searchable.

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.

Remarks

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.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
pSearchDef - A reference to a com.esri.arcgis.controls.IARSearchDef (in)
Returns:
A reference to a com.esri.arcgis.controls.IARFeatureCursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

String getDescription()
                      throws IOException,
                             AutomationException
The description of the layer.

Description

A description of the layer set by the publisher of the Published Map File. For example, an ARLayer with the Name 'water' may have the Description 'Upland river system, surveyed in 1990'.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

isSearchable

boolean isSearchable()
                     throws IOException,
                            AutomationException
Indicates if the layer is searchable (only feature layers are searchable).

Description

The Searchable property indicates whether the layer can be searched and queried, using the SearchARFeatures and QueryARFeatures methods. Only feature layers can be searched.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getInternalObject

Object getInternalObject()
                         throws IOException,
                                AutomationException
The internal ArcObjects ILayer object.

Description

Use the InternalObject property to access the underlying ILayer object. This property is always inaccessible.

Remarks

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.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

void getExtent(double[] xMin,
               double[] yMin,
               double[] xMax,
               double[] yMax)
               throws IOException,
                      AutomationException
The extent of the data within the layer.

Description

Returns the xmin, ymin, xmax and ymax coordinates of the full extent of data in the ARLayer in MapUnits.

Remarks

To zoom to the extent of an ARLayer pass the IARMap::SetExtent method the coordinates returned from the GetExtent method.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCustomProperty

Object getCustomProperty()
                         throws IOException,
                                AutomationException
A property to associate data with an object.

Description

Use the CustomProperty to associate any useful data with the ARLayer. This is similar to a 'Tag' property, and can be use to store strings, numbers and objects.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

setCustomProperty

void setCustomProperty(Object pVal)
                       throws IOException,
                              AutomationException
A property to associate data with an object.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

getType

String getType()
               throws IOException,
                      AutomationException
The description of the type of layer.

Description

Returns the type of ARLayer. For example, 'FeatureLayer' or 'RasterLayer'.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

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

queryARFeatures

IARFeatureSet queryARFeatures(IARSearchDef pSearchDef)
                              throws IOException,
                                     AutomationException
Searches the layer using a search definition and returns an ARFeatureSet.

Description

Queries the ARLayer based upon an attribute or spatial query as defined by the ArcReaderSearchDef. The ARLayer must be Searchable.

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.

Remarks

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.

Product Availability

Available with ArcGIS Desktop. Requires Publisher Extension.

Parameters:
pSearchDef - A reference to a com.esri.arcgis.controls.IARSearchDef (in)
Returns:
A reference to a com.esri.arcgis.controls.IARFeatureSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.