Class FeatureLayer
- java.lang.Object
-
- com.esri.arcgisruntime.layers.Layer
-
- com.esri.arcgisruntime.layers.FeatureLayer
-
- All Implemented Interfaces:
TimeAware
,LayerContent
,Loadable
,FloorAware
,PopupSource
- Direct Known Subclasses:
SubtypeFeatureLayer
public class FeatureLayer extends Layer implements FloorAware, PopupSource, TimeAware
A layer that can visualize vector/feature data.Feature layers display data from feature services or supported local data sources, including shapefiles, GeoPackages, and geodatabases. Feature layers can be used to display, select, and query features in a layer. 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. Feature layers can also be used to store features associated with a utility network.
To display features in a
FeatureCollectionTable
, useFeatureCollectionLayer
instead.Features 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 service feature table; 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 pushed to the server.
- Geodatabase — Backed by a geodatabase feature table; 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. Use a geodatabase sync task to synchronize the geodatabase with the service. The geodatabase can also be a mobile geodatabase created by ArcGIS Pro. Mobile geodatabases cannot be synced and use a default renderer.
- Shapefile — Backed by a shapefile feature table; use feature layers to show the contents of shapefiles (.shp).
- Geopackage — Backed by a geopackage feature table; use feature layers 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 can't support sync, because there is no backing feature service. ArcGIS Runtime supports GeoPackage versions 1.0, 1.1, and 1.2.
- Web Feature Service (WFS) — Backed by a WFS feature table. You can populate the table using Runtime query
parameters or raw XML-encoded GetFeature queries. A WFS feature table only supports manual cache feature request
mode. Runtime 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). Runtime guesses the correct order by default. This behavior can be configured with the
WfsFeatureTable.setAxisOrder(OgcAxisOrder)
andWfsFeatureTable.setFilterAxisOrder(OgcAxisOrder)
methods. - OGC API Features - Backed by an OGC feature collection table. You can populate the table using Runtime query parameters. An OCG feature collection table only supports manual cache feature request mode. Runtime supports OGC API - Features - Part 1 and OGC API - Features - Part 2.
The features displayed in a
FeatureLayer
are reprojected to match the spatial reference returned byGeoModel.getSpatialReference()
, if necessary. Local tables cannot be re-projected automatically.Feature layers expose a
getUnsupportedJson()
method that, for feature layers based on a feature service, returns a dictionary of values known to the supported web map specification but not explicitly exposed through the Runtime API. This allows you to access information that was saved with the layer but not used by Runtime. Feature layers also provides agetUnknownJson()
method to return JSON that was not recognized.Performance characteristics
As full feature information is cached locally in a geodatabase, shapefile, or GeoPackage, and features are drawn natively, this layer type offers excellent display performance when zooming and panning the map within the extent of cached features. Querying features is also efficient, enabling app functions such as real-time updates of query results in a map.
The local cache must be initially created, which can be resource-intensive for the server. The initial download to the device may require extensive network usage and subsequent local device storage. App memory increases with the number and complexity of the features cached. Network usage can be eliminated by provisioning the cache directly to the device in advance.
Feature tables backed by a service define three feature request modes. The table's feature request mode controls 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 must be 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:
Layer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FeatureLayer.RenderingMode
The different modes of rendering features.static class
FeatureLayer.SelectionMode
Represents the modes used for selecting features.
-
Constructor Summary
Constructors Modifier Constructor Description FeatureLayer(FeatureTable featureTable)
Constructs the FeatureLayer with the given FeatureTable.protected
FeatureLayer(com.esri.arcgisruntime.internal.jni.CoreFeatureLayer coreFeatureLayer, PortalItem portalItem, boolean addToCache)
Constructor that creates a wrapper for coreFeatureLayer's CoreFeatureTable, rather than using a FeatureTable that's been passed in by the app.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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addFullTimeExtentChangedListener(FullTimeExtentChangedListener listener)
Adds a listener that will fire when there is a change to the full time extent.void
clearSelection()
Clears the selection.FeatureLayer
copy()
Creates a deep copy of this FeatureLayer instance.String
getDefinitionExpression()
Gets the definition expression applied to layer by the developer.DisplayFilterDefinition
getDisplayFilterDefinition()
Defines how features are filtered from the display.FeatureTable
getFeatureTable()
Get the associated FeatureTable for FeatureLayer.LayerFloorDefinition
getFloorDefinition()
Gets the floor definition that defines the properties that allow a layer to be floor-aware.TimeExtent
getFullTimeExtent()
Returns the full time extent of the object.List<LabelDefinition>
getLabelDefinitions()
Gets a modifiable list of label definitions of the feature layer.PopupDefinition
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.long
getRefreshInterval()
Gets the refresh interval in milliseconds.Renderer
getRenderer()
Gets the layer's current renderer.FeatureLayer.RenderingMode
getRenderingMode()
Gets the rendering mode.LayerSceneProperties
getSceneProperties()
Gets a layer scene properties object that can be used to make changes to how features are displayed in a SceneView.ListenableFuture<FeatureQueryResult>
getSelectedFeaturesAsync()
Gets all the features selected.int
getSelectionColor()
Deprecated.As of 100.4.0, useSelectionProperties.getColor()
from yourGeoView
.double
getSelectionWidth()
Deprecated.As of 100.4.0, no replacement.FeatureTilingMode
getTilingMode()
Gets the feature tiling mode in use by the feature layer.TimeValue
getTimeInterval()
Returns the suggested time slider step size for this time aware object.TimeValue
getTimeOffset()
Returns the time offset applied to this object.Map<String,Object>
getUnknownJson()
Gets unknown data from the source JSON.Map<String,Object>
getUnsupportedJson()
Gets unsupported data from the source JSON.boolean
isLabelsEnabled()
Gets whether labels are enabled.boolean
isPopupEnabled()
Checks if the pop-up definition returned fromPopupSource.getPopupDefinition()
is enabled or disabled.boolean
isScaleSymbols()
Gets whether the layer's symbols and labels honor the map reference scale.boolean
isTimeFilteringEnabled()
Returns whether or not the object must use the time extent defined on the owning GeoView to filter its data.boolean
isTimeFilteringSupported()
Returns whether or not the object supports filtering its contents by time values with the extent set on the owning GeoView.boolean
removeFullTimeExtentChangedListener(FullTimeExtentChangedListener listener)
Removes a full time extent changed listener.void
resetFeaturesVisible()
Resets all features back to the visible state.void
resetRenderer()
Resets the renderer to the layer's default renderer.void
selectFeature(Feature feature)
Adds the feature to the current selection.void
selectFeatures(Iterable<Feature> features)
Adds features to the current selection.ListenableFuture<FeatureQueryResult>
selectFeaturesAsync(QueryParameters query, FeatureLayer.SelectionMode selectionMode)
Selects features, asynchronously, based on query and selection mode.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
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)
Enables or disables the labeling for the layer.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 layer's renderervoid
setRenderingMode(FeatureLayer.RenderingMode renderingMode)
Sets the rendering mode.void
setScaleSymbols(boolean scaleSymbols)
Sets whether the layer's symbols and labels honor the map reference scale.void
setSelectionColor(int selectionColor)
Deprecated.As of 100.4.0, useSelectionProperties.setColor(int)
from yourGeoView
.void
setSelectionWidth(double width)
Deprecated.As of 100.4.0, no replacement.void
setTilingMode(FeatureTilingMode tilingMode)
Sets the feature tiling mode in use by the feature layer.void
setTimeOffset(TimeValue timeOffset)
Sets a time offset for this object.void
unselectFeature(Feature feature)
Removes a feature from selection.void
unselectFeatures(Iterable<Feature> features)
Removes multiple features from selection.-
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, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
-
-
-
Constructor Detail
-
FeatureLayer
protected FeatureLayer(com.esri.arcgisruntime.internal.jni.CoreFeatureLayer coreFeatureLayer, PortalItem portalItem, boolean addToCache)
Constructor that creates a wrapper for coreFeatureLayer's CoreFeatureTable, rather than using a FeatureTable that's been passed in by the app.- Parameters:
coreFeatureLayer
- the core layer to wrapportalItem
- an existing PortalItem to use, or null if none exists yet and we need to ask the layer if it has a CorePortalItem in which case we create a wrapper for itaddToCache
- if true, adds this FeatureLayer instance to the wrapper cache- Since:
- 100.0.0
-
FeatureLayer
public FeatureLayer(FeatureTable featureTable)
Constructs the FeatureLayer with the given FeatureTable.Any of the inherited
FeatureTable
types can be used as the input parameter for this constructor, including theArcGISFeatureTable
,FeatureCollectionTable
,GeoPackageFeatureTable
,OgcFeatureCollectionTable
,ShapefileFeatureTable
, andWfsFeatureTable
.- Parameters:
featureTable
- feature table for this feature layer- Throws:
IllegalArgumentException
- if featureTable is null- Since:
- 100.0.0
-
FeatureLayer
public FeatureLayer(PortalItem portalItem)
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 layerPortalItem
- Throws:
IllegalArgumentException
- if portalItem is null- Since:
- 100.14.0
- See Also:
Layer.getItem()
-
FeatureLayer
public FeatureLayer(PortalItem portalItem, long layerId)
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 FeatureLayer will fail to load if an invalid portal item in passed in — for example, a feature layer portal item.
- Parameters:
portalItem
- a feature service PortalItemlayerId
- the ID of a layer within the feature service- Throws:
IllegalArgumentException
- if portalItem is null- Since:
- 100.0.0
-
-
Method Detail
-
copy
public FeatureLayer 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
public String getDefinitionExpression()
Gets the definition expression applied to layer by the developer.- Returns:
- the definition expression
- Since:
- 100.0.0
- See Also:
setDefinitionExpression(String)
-
setDefinitionExpression
public void setDefinitionExpression(String expression)
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 uses the SQL-92 where clause syntax. 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:
getDefinitionExpression()
-
getDisplayFilterDefinition
public DisplayFilterDefinition getDisplayFilterDefinition()
Defines how features are filtered from the display.Use this property to declutter the feature display. Since this only affects the display, features filtered by the
getDisplayFilterDefinition()
remain available for query, unlike features filtered bygetDefinitionExpression()
.- Returns:
- a DisplayFilterDefinition that defines how features are filtered from the display, or null if none
- Since:
- 100.13.0
- See Also:
ManualDisplayFilterDefinition
,ScaleDisplayFilterDefinition
-
setDisplayFilterDefinition
public void setDisplayFilterDefinition(DisplayFilterDefinition displayFilterDefinition)
Defines how features are filtered from the display.Use this property to declutter the feature display. Since this only affects the display, features filtered by the
getDisplayFilterDefinition()
remain available for query, unlike features filtered bygetDefinitionExpression()
.- Parameters:
displayFilterDefinition
- defines how features are filtered from the display- Since:
- 100.13.0
- See Also:
ManualDisplayFilterDefinition
,ScaleDisplayFilterDefinition
-
getPopupDefinition
public PopupDefinition 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:
PopupSource.setPopupDefinition(PopupDefinition)
-
setPopupDefinition
public void setPopupDefinition(PopupDefinition popupDefinition)
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:
PopupSource.getPopupDefinition()
-
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:
PopupSource.setPopupEnabled(boolean)
-
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:
PopupSource.isPopupEnabled()
-
isScaleSymbols
public boolean isScaleSymbols()
Gets whether the layer's symbols and labels honor the map reference scale.If the map has a positive reference scale, and the layer honors it, then symbols and labels will be drawn at their specified size when the viewing scale is the same as the reference scale, and 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 the FeatureLayer'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 reference scale, false if not
- Since:
- 100.5.0
-
setScaleSymbols
public void setScaleSymbols(boolean scaleSymbols)
Sets whether the layer's symbols and labels honor the map reference scale.If the map has a positive reference scale, and the layer honors it, then symbols and labels will be drawn at their specified size when the viewing scale is the same as the reference scale, and 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 the FeatureLayer'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 should honor the map reference scale, false if not- Since:
- 100.5.0
-
setLabelsEnabled
public void setLabelsEnabled(boolean enabled)
Enables or disables the labeling for the layer.- Parameters:
enabled
- true to enable, false to disable labels- Since:
- 100.0.0
-
isLabelsEnabled
public boolean isLabelsEnabled()
Gets whether labels are enabled.- Returns:
- true if labels are enabled, false if not
- Since:
- 100.0.0
-
getLabelDefinitions
public List<LabelDefinition> getLabelDefinitions()
Gets a modifiable list of label definitions of the feature layer.- Returns:
- a modifiable list of label definitions
- Since:
- 100.1.0
-
getFeatureTable
public FeatureTable getFeatureTable()
Get the associated FeatureTable for FeatureLayer.- Returns:
- the feature table
- Since:
- 100.0.0
-
getRenderer
public Renderer getRenderer()
Gets the layer's current renderer.- Returns:
- the renderer
- Since:
- 100.0.0
-
setRenderer
public void setRenderer(Renderer renderer)
Sets the layer's renderer- Parameters:
renderer
- the renderer to be used for this layer- Throws:
IllegalArgumentException
- if renderer is null- Since:
- 100.0.0
-
setSelectionColor
@Deprecated public void setSelectionColor(int selectionColor)
Deprecated.As of 100.4.0, useSelectionProperties.setColor(int)
from yourGeoView
.Sets the color that is applied to a selected feature.- Parameters:
selectionColor
- an integer representing the selection color as 0xAARRGGBB- Since:
- 100.0.0
-
getSelectionColor
@Deprecated public int getSelectionColor()
Deprecated.As of 100.4.0, useSelectionProperties.getColor()
from yourGeoView
.Returns the color applied to a selected feature.- Returns:
- an integer representing the selection color as 0xAARRGGBB
- Since:
- 100.0.0
-
getSelectionWidth
@Deprecated public double getSelectionWidth()
Deprecated.As of 100.4.0, no replacement.Gets the width of the selection highlight.- Returns:
- the width of the selection highlight
- Since:
- 100.0.0
-
setSelectionWidth
@Deprecated public void setSelectionWidth(double width)
Deprecated.As of 100.4.0, no replacement.Sets the width of the selection highlight.- Parameters:
width
- the width of the selection highlight- Throws:
IllegalArgumentException
- if width is less than 0- Since:
- 100.0.0
-
getSelectedFeaturesAsync
public ListenableFuture<FeatureQueryResult> getSelectedFeaturesAsync()
Gets all the features selected.- 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()
Resets all features back to the visible state.- Since:
- 100.0.0
-
resetRenderer
public void resetRenderer()
Resets the renderer to the layer's default renderer.- Since:
- 100.0.0
-
selectFeature
public void selectFeature(Feature feature)
Adds the feature to the current selection.- Parameters:
feature
- the feature to be added to selection- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
-
selectFeatures
public void selectFeatures(Iterable<Feature> features)
Adds features to the current selection.- Parameters:
features
- the features to be added to selection- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
selectFeaturesAsync
public ListenableFuture<FeatureQueryResult> selectFeaturesAsync(QueryParameters query, FeatureLayer.SelectionMode selectionMode)
Selects features, asynchronously, based on query and selection mode.- Parameters:
query
- the query to be applied to select featuresselectionMode
- the selection mode to be used- Returns:
- the result as a Future
- Throws:
IllegalArgumentException
- if query or selectionMode is null- Since:
- 100.0.0
-
setFeatureVisible
public void setFeatureVisible(Feature feature, boolean visible)
Makes a feature visible or invisible.- Parameters:
feature
- feature to change visibility ofvisible
- true to show, false to hide- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
-
setFeaturesVisible
public void setFeaturesVisible(Iterable<Feature> features, boolean visible)
Makes multiple features visible or invisible.- Parameters:
features
- features to change visibility ofvisible
- true to show, false to hide- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
unselectFeature
public void unselectFeature(Feature feature)
Removes a feature from selection.- Parameters:
feature
- feature to be unselected- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
-
unselectFeatures
public void unselectFeatures(Iterable<Feature> features)
Removes multiple features from selection.- Parameters:
features
- features to be unselected- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
getRenderingMode
public FeatureLayer.RenderingMode getRenderingMode()
Gets the rendering mode. The default value isFeatureLayer.RenderingMode.AUTOMATIC
.- Returns:
- the rendering mode
- Since:
- 100.2.0
-
setRenderingMode
public void setRenderingMode(FeatureLayer.RenderingMode renderingMode)
Sets the rendering mode.- Parameters:
renderingMode
- the rendering mode- Throws:
IllegalArgumentException
- if renderingMode is null- Since:
- 100.2.0
-
getSceneProperties
public LayerSceneProperties getSceneProperties()
Gets a layer scene properties object that can be used to make changes to how features are displayed in a SceneView.None of these settings will take effect if the layer is displayed in a
MapView
.- Returns:
- a layer scene properties object that can be used to make changes to how graphics are displayed in a SceneView. None of these settings will take effect if this applies to a MapView.
- Since:
- 100.2.0
-
getTilingMode
public FeatureTilingMode getTilingMode()
Gets the feature tiling mode in use by the feature layer. Default isFeatureTilingMode.ENABLED_WHEN_SUPPORTED
.Changes how feature tiling is handled by the feature layer.
- Returns:
- determines whether or not feature tiling is used
- Since:
- 100.10.0
- See Also:
FeatureTilingMode
-
setTilingMode
public void setTilingMode(FeatureTilingMode tilingMode)
Sets the feature tiling mode in use by the feature layer.- Parameters:
tilingMode
- the feature tiling mode to use- Throws:
IllegalArgumentException
- if tilingMode is null- Since:
- 100.10.0
-
getFullTimeExtent
public TimeExtent 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
public TimeValue 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
public TimeValue 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
public void setTimeOffset(TimeValue timeOffset)
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
public void addFullTimeExtentChangedListener(FullTimeExtentChangedListener listener)
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
public boolean removeFullTimeExtentChangedListener(FullTimeExtentChangedListener listener)
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
public LayerFloorDefinition 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
public void setFloorDefinition(LayerFloorDefinition floorDefinition)
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
public Map<String,Object> getUnknownJson()
Gets unknown data from the source JSON. Unknown JSON is a dictionary of values that was in the source JSON but was not parsed by the Runtime.- Returns:
- an unmodifiable map with string keys and object values
- Since:
- 100.7.0
-
getUnsupportedJson
public Map<String,Object> getUnsupportedJson()
Gets unsupported data from the source JSON. Unsupported JSON is a dictionary of values that are supported by webmaps, but not exposed through the native Runtime API- Returns:
- an unmodifiable map with string keys and object values
- Since:
- 100.7.0
-
-