- All Implemented Interfaces:
TimeAware
,LayerContent
,Loadable
,FloorAware
,PopupSource
,SnapSource
- Direct Known Subclasses:
SubtypeFeatureLayer
Feature layers can display Feature
data from a range of online feature table sources,
such as ServiceFeatureTable
, WfsFeatureTable
or OgcFeatureCollectionTable
source, and offline sources such as
GeodatabaseFeatureTable
, ShapefileFeatureTable
,
or GeoPackageFeatureTable
. You can construct a feature layer object using these
feature table sources or you can obtain it directly from a map or scene's collection of
GeoModel.getOperationalLayers()
.
Feature layers can also be used to store features associated with a utility network. To display features
in a FeatureCollectionTable
, use FeatureCollectionLayer
instead.
Feature layers can be used to display, select, and query features in a layer. Individual features can be queried and filtered based on spatial queries or SQL queries. String comparisons for features queried in service feature tables are case insensitive.
If the underlying feature service or table supports editing, you can use it with a feature layer as a basis for editing geometry, attributes, and attachments.
The features in a feature layer are retrieved as needed by the app. Features can be downloaded from a sync-enabled feature service when the device is connected and cached locally for use when the device is offline. Edits can then be synchronized back to the service.
Functional characteristics
The following are sources that can be rendered using a feature layer.
- Feature service — Backed by a
ServiceFeatureTable
; feature data from the service is cached locally in the table. New features are retrieved automatically when you navigate the map. The local table cache is discarded when the layer is disposed. If sync is enabled, features can be created, edited, and synchronized back to the server. - Geodatabase — Backed by a
GeodatabaseFeatureTable
; The geodatabase can be a replica of a feature service, which allows synchronizing with a feature service, or taking the content of a feature service offline. UseGeodatabaseSyncTask
to synchronize the geodatabase with the service. The geodatabase can also be a mobile geodatabase created by ArcGIS Pro. These geodatabases cannot be synced and use a default renderer. - Shapefile — Backed by a
ShapefileFeatureTable
. Use feature layers to show the contents of a shapefile (.shp). - Geopackage — Backed by a
GeoPackageFeatureTable
. This uses feature a layer to render the tables in a GeoPackage (.gpkg). A GeoPackage is a data source that conforms to the OGC GeoPackage specification. Geopackage feature tables can be edited and saved, but do not support sync, because there is no backing feature service. This API supports GeoPackage versions 1.0, 1.1, and 1.2. - Web Feature Service (WFS) — Backed by a
WfsFeatureTable
. You can populate the table usingQueryParameters
or raw XML-encoded GetFeature queries. A WFS feature table only supports the manual cache feature request mode. This API supports OGC WFS versions 2.0.0 and 2.0.2.WFS server implementations are inconsistent in how they expect coordinates to be formatted. Some return and expect coordinates in (x,y) order, while others expect (y,x). This API anticipates the order but you can configure it with the
WfsFeatureTable.getAxisOrder()
andWfsFeatureTable.getFilterAxisOrder()
. - OGC API Features - Backed by an
OgcFeatureCollectionTable
. You can populate the table usingQueryParameters
. An OCG feature collection table only supports the manual cache feature request mode. This API supports OGC API - Features - Part 1 and OGC API - Features - Part 2.
GeoModel.getSpatialReference()
, if necessary. Local tables cannot be projected automatically.
FeatureLayer does not expose every value defined in the web map or web scene specification.
You can obtain a dictionary of unsupported values from getUnsupportedJson()
. The
FeatureLayer also provides getUnknownJson()
to return JSON that is not recognized in
the web map or web scene specification.
Performance characteristics
The feature layer offers excellent display performance when zooming and panning the map within the extent of locally cached features. This is because features are drawn natively and full feature information is cached locally in a geodatabase, shapefile, or GeoPackage. Querying features is also efficient, enabling app functions such as real-time updates of query results in a map.
Initially, a local cache must be created. The initial download to the device may require extensive network usage and subsequent local device storage. App memory usage increases with the number and complexity of the features cached. You can eliminate the network usage by provisioning the cache directly to the device in advance.
If the feature layer's FeatureTable
is backed by a service it has three feature request modes
(ServiceFeatureTable.FeatureRequestMode
) that control how and when features are requested from the service:
- On interaction cache — Features are requested automatically for the visible map or scene extent. As the user pans and zooms, features are cached locally. If the user returns to an area where features have already been loaded, the table won't need to download those features again.
- Manual cache — Features are manually populated using a call to
ServiceFeatureTable.populateFromServiceAsync(QueryParameters, boolean, Iterable)
Once populated, all queries are made against the local table only.ServiceFeatureTable.populateFromServiceAsync(QueryParameters, boolean, Iterable)
can be called again to retrieve more features from the service. - On interaction, no cache — Features are requested automatically for the visible map extent. As the user pans and zooms, features outside the visible extent are not cached and must be downloaded again each time.
- Since:
- 100.0.0
- See Also:
-
Property Summary
TypePropertyDescriptionDefines properties for dynamically aggregating and summarizing groups of features as the map scale or visible extent changes.Properties inherited from class com.esri.arcgisruntime.layers.Layer
loadError, loadStatus
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The different modes of rendering features.static enum
Represents the modes used for selecting features. -
Constructor Summary
ConstructorDescriptionFeatureLayer
(FeatureTable featureTable) Creates a new feature layer from a givenFeatureTable
.FeatureLayer
(PortalItem portalItem) Creates a new feature layer object from a feature layer or feature service portal item.FeatureLayer
(PortalItem portalItem, long layerId) Creates a new FeatureLayer based on a layer within a feature service PortalItem. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener that will fire when there is a change to the full time extent.void
Clears the selection.copy()
Creates a deep copy of this FeatureLayer instance.Defines properties for dynamically aggregating and summarizing groups of features as the map scale or visible extent changes.Gets the definition expression applied to layer by the developer.Defines how features are filtered from the display.Gets the value of thefeatureReduction
property.Gets the feature table whose features are drawn on the map by this layer.Gets the floor definition that defines the properties that allow a layer to be floor-aware.Returns the full time extent of the object.Gets a modifiable list ofLabelDefinition
objects that define how labels are displayed.Gets the PopupDefinition defined in the FeatureLayer definition or set viasetPopupDefinition(PopupDefinition)
, or null if one is not defined and one has not been set.long
Gets the refresh interval in milliseconds.Gets the renderer which specifies how the features are symbolized.Gets the mode which defines how the feature layer is rendered.Properties that are applied when the layer is rendered in a 3D scene using aSceneView
object.Returns a collection of the currently selected features.Gets the mode defines whether feature tiling is used to retrieve the features from the feature service.Returns the suggested time slider step size for this time aware object.Returns the time offset applied to this object.Gets unknown data from the source JSON.Gets unsupported data from the source JSON.boolean
True if features in the layer are labelled, otherwise false.boolean
Checks if the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.boolean
True if the layer's symbols and labels honor the map's reference scale, otherwise false.boolean
Returns whether or not the object must use the time extent defined on the owning GeoView to filter its data.boolean
Returns whether or not the object supports filtering its contents by time values with the extent set on the owning GeoView.boolean
Removes a full time extent changed listener.void
Reset the visibility of all features back to their original state.void
Reset the renderer back to the original renderer provided by theFeatureTable
.void
selectFeature
(Feature feature) Selects the given feature and adds it to the current collection of selected features.void
selectFeatures
(Iterable<Feature> features) Selects the given features and adds them to the current collection of selected features.selectFeaturesAsync
(QueryParameters query, FeatureLayer.SelectionMode selectionMode) Selects the features that match the criteria in theQueryParameters
object and adds them to the current collection of selected features.void
setDefinitionExpression
(String expression) Sets a definition expression which is a SQL statement where clause to filter out the features to be displayed.void
setDisplayFilterDefinition
(DisplayFilterDefinition displayFilterDefinition) Defines how features are filtered from the display.void
setFeatureReduction
(FeatureReduction featureReduction) Sets the value of thefeatureReduction
property.void
setFeaturesVisible
(Iterable<Feature> features, boolean visible) Makes multiple features visible or invisible.void
setFeatureVisible
(Feature feature, boolean visible) Makes a feature visible or invisible.void
setFloorDefinition
(LayerFloorDefinition floorDefinition) Sets the floor definition that defines the properties that allow a layer to be floor-aware.void
setIsTimeFilteringEnabled
(boolean enabled) Enables or disables whether the object must use the time extent defined on the owning GeoView to filter its data.void
setLabelsEnabled
(boolean enabled) True if features in the layer are labelled, otherwise false.void
setPopupDefinition
(PopupDefinition popupDefinition) Sets the PopupDefinition for the FeatureLayer, overriding the previous one (for example, the one defined in the FeatureLayer definition).void
setPopupEnabled
(boolean enabled) Sets whether the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.void
setRefreshInterval
(long refreshIntervalMilliseconds) Sets the refresh interval in milliseconds.void
setRenderer
(Renderer renderer) Sets the renderer specifies how the features are symbolized.void
setRenderingMode
(FeatureLayer.RenderingMode renderingMode) Sets the mode which defines how the feature layer is rendered.void
setScaleSymbols
(boolean scaleSymbols) True if the layer's symbols and labels honor the map's reference scale, otherwise false.void
setTilingMode
(FeatureTilingMode tilingMode) Sets the mode defines whether feature tiling is used to retrieve the features from the feature service.void
setTimeOffset
(TimeValue timeOffset) Sets a time offset for this object.void
unselectFeature
(Feature feature) Unselects the given feature and removes it from the current collection of selected features.void
unselectFeatures
(Iterable<Feature> features) Unselects the given features and removes them from the current collection of selected features.Methods inherited from class com.esri.arcgisruntime.layers.Layer
addDoneLoadingListener, addLoadStatusChangedListener, addVisibilityChangedListener, cancelLoad, canChangeVisibility, canShowInLegend, fetchLegendInfosAsync, getAttribution, getDescription, getFullExtent, getId, getItem, getLoadError, getLoadStatus, getMaxScale, getMinScale, getName, getOpacity, getSpatialReference, getSubLayerContents, isIdentifyEnabled, isVisible, isVisibleAtScale, loadAsync, loadErrorProperty, loadStatusProperty, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
Property Details
-
featureReduction
Defines properties for dynamically aggregating and summarizing groups of features as the map scale or visible extent changes.FeatureReduction
is only supported for point feature layers in dynamic rendering mode (FeatureLayer.RenderingMode.DYNAMIC
) in 2D. The following conditions will generate aLayerViewState
error and will result in the layer rendering the original features.- A FeatureLayer that uses static rendering mode is enabled with
FeatureReduction
. - A FeatureLayer enabled with
FeatureReduction
is added to anArcGISScene
(or anArcGISScene
that contains such a layer is loaded). - An unsupported renderer is used as the
AggregationFeatureReduction.rendererProperty()
. SeeAggregationFeatureReduction.rendererProperty()
for more info.
If this property is explicitly set to null,
FeatureReduction
is removed from the FeatureLayer and is not persisted when saving the map.- Since:
- 200.2.0
- See Also:
- A FeatureLayer that uses static rendering mode is enabled with
-
-
Constructor Details
-
FeatureLayer
Creates a new feature layer from a givenFeatureTable
.Any inherited
FeatureTable
type can be used as the input parameter for this constructor, exceptFeatureCollectionTable
. To display features in aFeatureCollectionTable
, useFeatureCollectionLayer
.- Parameters:
featureTable
- the feature table used as the data source of the feature layer- Throws:
IllegalArgumentException
- if featureTable is null- Since:
- 100.0.0
-
FeatureLayer
Creates a new feature layer object from a feature layer or feature service portal item.If the portal item is a feature service, the FeatureLayer will be created from the first layer on the service.
- Parameters:
portalItem
- a feature layer or feature servicePortalItem
- Throws:
IllegalArgumentException
- if portalItem is null- Since:
- 100.14.0
- See Also:
-
FeatureLayer
Creates a new FeatureLayer based on a layer within a feature service PortalItem.If the portal item argument is not in
LoadStatus#LOADED
state, it will be loaded automatically when this FeatureLayer instance is loaded.The feature layer will fail to load if an invalid portal item is passed in.
- Parameters:
portalItem
- a feature servicePortalItem
. The item's type must bePortalItem.Type.FEATURE_SERVICE
.layerId
- the layer ID of an individual layer in the ArcGIS feature service represented by the item parameter- Throws:
IllegalArgumentException
- if portalItem is null- Since:
- 100.0.0
-
-
Method Details
-
copy
Creates a deep copy of this FeatureLayer instance.- Returns:
- a deep copy of this FeatureLayer instance, which means that copies of all fields of this layer are made including its loading state
- Since:
- 100.1.0
-
getRefreshInterval
public long getRefreshInterval()Gets the refresh interval in milliseconds. The refresh interval is the time between automatic layer requests. A value of zero means the layer is never refreshed. The default value is zero.- Returns:
- the refresh interval in milliseconds
- Since:
- 100.1.0
-
setRefreshInterval
public void setRefreshInterval(long refreshIntervalMilliseconds) Sets the refresh interval in milliseconds. The refresh interval is the time between automatic layer requests. A value of zero means the layer is never refreshed. The default value is zero.- Parameters:
refreshIntervalMilliseconds
- the refresh interval in milliseconds- Throws:
IllegalArgumentException
- if milliseconds is less than zero- Since:
- 100.1.0
-
getDefinitionExpression
Gets the definition expression applied to layer by the developer. The definition expression string should follow standard SQL syntax as detailed in the SQL reference for query expressions used in ArcGIS document.- Returns:
- the definition expression
- Since:
- 100.0.0
- See Also:
-
setDefinitionExpression
Sets a definition expression which is a SQL statement where clause to filter out the features to be displayed. The definition expression is used to query the feature table related to the feature layer and only features meeting the query criteria will be displayed on the layer.The definition expression string should follow standard SQL syntax as detailed in the SQL reference for query expressions used in ArcGIS document. Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article entitled "Querying Feature Services Date-Time Queries". for more information.
- Parameters:
expression
- the definition expression, it can be null- Since:
- 100.0.0
- See Also:
-
getDisplayFilterDefinition
Defines how features are filtered from the display.Use this property to reduce the number of features displayed in the map or scene view. The filter aims to improve data visualization and optimize rendering performance. It only affects the display of features so all features are still available for query methods such as
selectFeaturesAsync(QueryParameters, SelectionMode)
.- Returns:
- a DisplayFilterDefinition that defines how features are filtered from the display, or null if none
- Since:
- 100.13.0
- See Also:
-
setDisplayFilterDefinition
Defines how features are filtered from the display.Use this property to reduce the number of features displayed in the map or scene view. The filter aims to improve data visualization and optimize rendering performance. It only affects the display of features so all features are still available for query methods such as
selectFeaturesAsync(QueryParameters, SelectionMode)
: Future<FeatureQueryResult>.- Parameters:
displayFilterDefinition
- defines how features are filtered from the display- Since:
- 100.13.0
- See Also:
-
getPopupDefinition
Gets the PopupDefinition defined in the FeatureLayer definition or set viasetPopupDefinition(PopupDefinition)
, or null if one is not defined and one has not been set.- Specified by:
getPopupDefinition
in interfacePopupSource
- Returns:
- the FeatureLayer's PopupDefinition
- Since:
- 100.0.0
- See Also:
-
setPopupDefinition
Sets the PopupDefinition for the FeatureLayer, overriding the previous one (for example, the one defined in the FeatureLayer definition).- Specified by:
setPopupDefinition
in interfacePopupSource
- Parameters:
popupDefinition
- the PopupDefinition to set- Since:
- 100.0.0
- See Also:
-
isPopupEnabled
public boolean isPopupEnabled()Description copied from interface:PopupSource
Checks if the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.- Specified by:
isPopupEnabled
in interfacePopupSource
- Returns:
- true if the pop-up definition is enabled; false otherwise. Will return false if an error occurs.
- See Also:
-
setPopupEnabled
public void setPopupEnabled(boolean enabled) Description copied from interface:PopupSource
Sets whether the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.- Specified by:
setPopupEnabled
in interfacePopupSource
- Parameters:
enabled
- true to enable the PopupDefinition; false otherwise- See Also:
-
isScaleSymbols
public boolean isScaleSymbols()True if the layer's symbols and labels honor the map's reference scale, otherwise false.If the map has a positive reference scale, and the layer honors it, then symbols and labels are drawn at their specified size when the viewing scale is the same as the reference scale. They will grow or shrink as the view zooms in or out, to keep the symbol a fixed size on the map. If the map has no reference scale, the reference scale is zero, or this feature layer's scaleSymbols property is false, then the symbols and labels will be drawn at their fixed screen size.
- Returns:
- true if the layer's symbols and labels honor the map's reference scale, otherwise false
- Since:
- 100.5.0
-
setScaleSymbols
public void setScaleSymbols(boolean scaleSymbols) True if the layer's symbols and labels honor the map's reference scale, otherwise false.If the map has a positive reference scale, and the layer honors it, then symbols and labels are drawn at their specified size when the viewing scale is the same as the reference scale. They will grow or shrink as the view zooms in or out, to keep the symbol a fixed size on the map. If the map has no reference scale, the reference scale is zero, or this feature layer's scaleSymbols property is false, then the symbols and labels will be drawn at their fixed screen size.
- Parameters:
scaleSymbols
- true if the layer's symbols and labels honor the map's reference scale, otherwise false- Since:
- 100.5.0
-
setLabelsEnabled
public void setLabelsEnabled(boolean enabled) True if features in the layer are labelled, otherwise false.- Parameters:
enabled
- true if features in the layer are labelled, otherwise false- Since:
- 100.0.0
-
isLabelsEnabled
public boolean isLabelsEnabled()True if features in the layer are labelled, otherwise false.- Returns:
- true if features in the layer are labelled, otherwise false
- Since:
- 100.0.0
-
getLabelDefinitions
Gets a modifiable list ofLabelDefinition
objects that define how labels are displayed.- Returns:
- a modifiable list of
LabelDefinition
objects that define how labels are displayed - Since:
- 100.1.0
-
featureReductionProperty
Defines properties for dynamically aggregating and summarizing groups of features as the map scale or visible extent changes.FeatureReduction
is only supported for point feature layers in dynamic rendering mode (FeatureLayer.RenderingMode.DYNAMIC
) in 2D. The following conditions will generate aLayerViewState
error and will result in the layer rendering the original features.- A FeatureLayer that uses static rendering mode is enabled with
FeatureReduction
. - A FeatureLayer enabled with
FeatureReduction
is added to anArcGISScene
(or anArcGISScene
that contains such a layer is loaded). - An unsupported renderer is used as the
AggregationFeatureReduction.rendererProperty()
. SeeAggregationFeatureReduction.rendererProperty()
for more info.
If this property is explicitly set to null,
FeatureReduction
is removed from the FeatureLayer and is not persisted when saving the map.- Returns:
- the
featureReduction
property - Since:
- 200.2.0
- See Also:
- A FeatureLayer that uses static rendering mode is enabled with
-
getFeatureReduction
Gets the value of thefeatureReduction
property.- Property description:
- Defines properties for dynamically aggregating and summarizing groups of features as the map scale or visible extent
changes.
FeatureReduction
is only supported for point feature layers in dynamic rendering mode (FeatureLayer.RenderingMode.DYNAMIC
) in 2D. The following conditions will generate aLayerViewState
error and will result in the layer rendering the original features.- A FeatureLayer that uses static rendering mode is enabled with
FeatureReduction
. - A FeatureLayer enabled with
FeatureReduction
is added to anArcGISScene
(or anArcGISScene
that contains such a layer is loaded). - An unsupported renderer is used as the
AggregationFeatureReduction.rendererProperty()
. SeeAggregationFeatureReduction.rendererProperty()
for more info.
If this property is explicitly set to null,
FeatureReduction
is removed from the FeatureLayer and is not persisted when saving the map. - A FeatureLayer that uses static rendering mode is enabled with
- Returns:
- the value of the
featureReduction
property - Since:
- 200.2.0
- See Also:
-
setFeatureReduction
Sets the value of thefeatureReduction
property.- Property description:
- Defines properties for dynamically aggregating and summarizing groups of features as the map scale or visible extent
changes.
FeatureReduction
is only supported for point feature layers in dynamic rendering mode (FeatureLayer.RenderingMode.DYNAMIC
) in 2D. The following conditions will generate aLayerViewState
error and will result in the layer rendering the original features.- A FeatureLayer that uses static rendering mode is enabled with
FeatureReduction
. - A FeatureLayer enabled with
FeatureReduction
is added to anArcGISScene
(or anArcGISScene
that contains such a layer is loaded). - An unsupported renderer is used as the
AggregationFeatureReduction.rendererProperty()
. SeeAggregationFeatureReduction.rendererProperty()
for more info.
If this property is explicitly set to null,
FeatureReduction
is removed from the FeatureLayer and is not persisted when saving the map. - A FeatureLayer that uses static rendering mode is enabled with
- Parameters:
featureReduction
- the value for thefeatureReduction
property- Since:
- 200.2.0
- See Also:
-
getFeatureTable
Gets the feature table whose features are drawn on the map by this layer.- Returns:
- the feature table whose features are drawn on the map by this layer, or null if none
- Since:
- 100.0.0
-
getRenderer
Gets the renderer which specifies how the features are symbolized.- Returns:
- the renderer specifies how the features are symbolized, or null if none
- Since:
- 100.0.0
-
setRenderer
Sets the renderer specifies how the features are symbolized.- Parameters:
renderer
- the renderer specifies how the features are symbolized- Throws:
IllegalArgumentException
- if renderer is null- Since:
- 100.0.0
-
getSelectedFeaturesAsync
Returns a collection of the currently selected features.- Returns:
- a future that represents the selected features
- Since:
- 100.0.0
-
clearSelection
public void clearSelection()Clears the selection.- Since:
- 100.0.0
-
resetFeaturesVisible
public void resetFeaturesVisible()Reset the visibility of all features back to their original state.- Since:
- 100.0.0
-
resetRenderer
public void resetRenderer()Reset the renderer back to the original renderer provided by theFeatureTable
.- Since:
- 100.0.0
-
selectFeature
Selects the given feature and adds it to the current collection of selected features.Selected features are rendered according to the
GeoView.getSelectionProperties()
.- Parameters:
feature
- the feature to be added to selection- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
-
selectFeatures
Selects the given features and adds them to the current collection of selected features.Use the
getSelectedFeaturesAsync()
: Future<FeatureQueryResult> to retrieve all the selected features.- Parameters:
features
- a collection of features to be selected. Contents of theIterable
are copied.- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
selectFeaturesAsync
public ListenableFuture<FeatureQueryResult> selectFeaturesAsync(QueryParameters query, FeatureLayer.SelectionMode selectionMode) Selects the features that match the criteria in theQueryParameters
object and adds them to the current collection of selected features.- Parameters:
query
- a query that defines features to select from theFeatureTable
selectionMode
- defines how the collection of currently selected features will be updated with the features returned from the query- Returns:
- the result as a Future
- Throws:
IllegalArgumentException
- if query or selectionMode is null- Since:
- 100.0.0
-
setFeatureVisible
Makes a feature visible or invisible.- Parameters:
feature
- feature to change visibility ofvisible
- true to show the features, otherwise false- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
-
setFeaturesVisible
Makes multiple features visible or invisible.- Parameters:
features
- features to change visibility ofvisible
- true to show the features, otherwise false- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
unselectFeature
Unselects the given feature and removes it from the current collection of selected features.- Parameters:
feature
- feature to be unselected- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
-
unselectFeatures
Unselects the given features and removes them from the current collection of selected features.- Parameters:
features
- features to be unselected- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
getRenderingMode
Gets the mode which defines how the feature layer is rendered.FeatureLayer.RenderingMode.STATIC
mode is better suited for displaying large datasets (in terms of the number of vertices) and for complex symbology because it does not update the layer's display while pan/zoom operations are in progress.FeatureLayer.RenderingMode.DYNAMIC
mode is better suited for small datasets that update frequently or for better interactive experiences when the layer's display is updated continuously while pan/zoom operations are in progress.- Returns:
- the mode defines how the feature layer is rendered
- Since:
- 100.2.0
-
setRenderingMode
Sets the mode which defines how the feature layer is rendered.FeatureLayer.RenderingMode.STATIC
mode is better suited for displaying large datasets (in terms of the number of vertices) and for complex symbology because it does not update the layer's display while pan/zoom operations are in progress.FeatureLayer.RenderingMode.DYNAMIC
mode is better suited for small datasets that update frequently or for better interactive experiences when the layer's display is updated continuously while pan/zoom operations are in progress.- Parameters:
renderingMode
- the mode defines how the feature layer is rendered- Throws:
NullPointerException
- if renderingMode is nullIllegalArgumentException
- if renderingMode is null- Since:
- 100.2.0
-
getSceneProperties
Properties that are applied when the layer is rendered in a 3D scene using aSceneView
object.- Returns:
- properties that are applied when the layer is rendered in a 3D scene using a
SceneView
object - Since:
- 100.2.0
-
getTilingMode
Gets the mode defines whether feature tiling is used to retrieve the features from the feature service.The default tiling mode is
FeatureTilingMode.ENABLED_WHEN_SUPPORTED
.- Returns:
- the mode defines whether feature tiling is used to retrieve the features from the feature service
- Since:
- 100.10.0
-
setTilingMode
Sets the mode defines whether feature tiling is used to retrieve the features from the feature service.The default tiling mode is
FeatureTilingMode.ENABLED_WHEN_SUPPORTED
.- Parameters:
tilingMode
- the mode defines whether feature tiling is used to retrieve the features from the feature service- Throws:
IllegalArgumentException
- if tilingMode is null- Since:
- 100.10.0
-
getFullTimeExtent
Description copied from interface:TimeAware
Returns the full time extent of the object. Will be null if the object is not time aware.- Specified by:
getFullTimeExtent
in interfaceTimeAware
- Returns:
- the time extent, or null if the object is not time aware
-
getTimeInterval
Description copied from interface:TimeAware
Returns the suggested time slider step size for this time aware object. Can be null if no time interval is suggested for this time aware object.- Specified by:
getTimeInterval
in interfaceTimeAware
- Returns:
- the time interval, or null if there is no time interval
-
getTimeOffset
Description copied from interface:TimeAware
Returns the time offset applied to this object. The offset is subtracted from the time extent set on the owningGeoView
. This allows for data from different periods of time to be compared.- Specified by:
getTimeOffset
in interfaceTimeAware
- Returns:
- the time offset, or null if no offset has been set
-
isTimeFilteringEnabled
public boolean isTimeFilteringEnabled()Description copied from interface:TimeAware
Returns whether or not the object must use the time extent defined on the owning GeoView to filter its data.- Specified by:
isTimeFilteringEnabled
in interfaceTimeAware
- Returns:
- true if time filtering is enabled; otherwise false
-
setIsTimeFilteringEnabled
public void setIsTimeFilteringEnabled(boolean enabled) Description copied from interface:TimeAware
Enables or disables whether the object must use the time extent defined on the owning GeoView to filter its data.- Specified by:
setIsTimeFilteringEnabled
in interfaceTimeAware
- Parameters:
enabled
- true to enable time filtering; otherwise false
-
isTimeFilteringSupported
public boolean isTimeFilteringSupported()Description copied from interface:TimeAware
Returns whether or not the object supports filtering its contents by time values with the extent set on the owning GeoView.- Specified by:
isTimeFilteringSupported
in interfaceTimeAware
- Returns:
- true if time filtering is supported; otherwise false
-
setTimeOffset
Description copied from interface:TimeAware
Sets a time offset for this object. The time offset is subtracted from the time extent set on the owningGeoView
. This allows for data from different periods of time to be compared. Can be null if there is no time offset.- Specified by:
setTimeOffset
in interfaceTimeAware
- Parameters:
timeOffset
- the time offset, or null if there is no time offset
-
addFullTimeExtentChangedListener
Description copied from interface:TimeAware
Adds a listener that will fire when there is a change to the full time extent.- Specified by:
addFullTimeExtentChangedListener
in interfaceTimeAware
- Parameters:
listener
- the listener to add
-
removeFullTimeExtentChangedListener
Description copied from interface:TimeAware
Removes a full time extent changed listener.- Specified by:
removeFullTimeExtentChangedListener
in interfaceTimeAware
- Parameters:
listener
- the listener to remove- Returns:
- true if the listener was removed, otherwise false
-
getFloorDefinition
Description copied from interface:FloorAware
Gets the floor definition that defines the properties that allow a layer to be floor-aware.When a layer is configured as floor-aware, it has a
FloorAware.getFloorDefinition()
property that defines properties that allow a layer to be floor-aware. When it is null (default value) the specific layer does not support floor filtering.- Specified by:
getFloorDefinition
in interfaceFloorAware
- Returns:
- the floor definition that defines the properties that allow a layer to be floor-aware, or null if none
-
setFloorDefinition
Description copied from interface:FloorAware
Sets the floor definition that defines the properties that allow a layer to be floor-aware.When a layer is configured as floor-aware, it has a
FloorAware.getFloorDefinition()
property that defines properties that allow a layer to be floor-aware. When it is null (default value) the specific layer does not support floor filtering.- Specified by:
setFloorDefinition
in interfaceFloorAware
- Parameters:
floorDefinition
- the floor definition that defines the properties that allow a layer to be floor-aware
-
getUnknownJson
Gets unknown data from the source JSON.Unknown JSON is a Map of values not defined in the ArcGIS specification used to create this object but found in the source JSON. If the object is written back to JSON, any unknown JSON data is not persisted. The ArcGIS specification may be for a web map, web scene, REST API, and so on.
- Returns:
- an unmodifiable map with string keys and object values of unknown data from the source JSON
- Since:
- 100.7.0
-
getUnsupportedJson
Gets unsupported data from the source JSON.Unsupported JSON is a Map of values defined in the ArcGIS specification used to create this object but not currently used in this API. If the object is written back to JSON, any unsupported JSON data is persisted. The ArcGIS specification may be from a web map, web scene, REST API, and so on.
- Returns:
- an unmodifiable map with string keys and object values of unsupported data from the source JSON
- Since:
- 100.7.0
-