SubtypeFeatureLayer class final
A layer that can visualize feature data with different visibility, rendering, popup properties, and so on for some or all of the subtypes in an ArcGISFeatureTable.
The ArcGISFeatureTable must have an ArcGISFeatureLayerInfo.subtypeField and at least one FeatureSubtype defined, otherwise the layer will fail to load.
Subtypes provide a way to organize your data within an ArcGIS feature table. For example, the streets in a city streets feature table could be categorized into three subtypes - local streets, collector streets, and arterial streets. The benefit of the subtype feature layer is that it allows you to configure different layer properties per subtype. This is particularly useful for data, such as utility networks, in which many different network elements are grouped into a single subtype feature layer.
Functional characteristics
The subtype feature layer acts like a group layer that automatically creates one feature layer, or subtype sublayer, for each subtype in the table. Each subtype sublayer can be configured independently of one another. They can have different renderers, label definitions, max and min scales, visibility, layer order in the map, and so on. When a subtype group layer is read from a web map or mobile map, it is represented as a SubtypeFeatureLayer. Saving a map that contains a SubtypeFeatureLayer will save the layer as a subtype group layer. Subtype feature layers are supported in offline maps and will work in offline editing workflows.
Performance characteristics
Queries are optimized across all sublayers. For example, a pan of the map sends a single request to the feature table to cover all the sublayers. If you had manually created a feature layer for each subtype, this would have resulted in one query per feature layer.
- Inheritance
-
- Object
- Layer
- FeatureLayer
- SubtypeFeatureLayer
Constructors
- SubtypeFeatureLayer.withFeatureTable(ArcGISFeatureTable featureTable)
-
Creates a new subtype feature layer object.
factory
- SubtypeFeatureLayer.withItem({required Item item, required int layerId})
-
Creates a new subtype feature layer object from a feature service portal
item.
factory
Properties
- attribution → String
-
The attribution text for the layer.
no setterinherited
- canChangeVisibility → bool
-
A flag indicating whether the layer content's visibility can be changed.
no setterinherited
- definitionExpression ↔ String
-
A SQL expression which limits the features available for query and display
on the feature layer.
getter/setter pairinherited
- description ↔ String
-
The description for the layer.
getter/setter pairinherited
- displayFilterDefinition ↔ DisplayFilterDefinition?
-
Defines how features are filtered from the display.
getter/setter pairinherited
- featureReduction ↔ FeatureReduction?
-
Defines properties for dynamically aggregating and summarizing groups of
features as the map scale or visible extent changes.
getter/setter pairinherited
- featureTable → FeatureTable?
-
The feature table whose features are drawn on the map by this layer.
no setterinherited
- fullExtent → Envelope?
-
The full extent of this layer, which is the extent where all layer data is
contained.
no setterinherited
- fullTimeExtent → TimeExtent?
-
The full time extent of the layer.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
The unique identifying string for the layer, as specified in a map or
scene.
getter/setter pairinherited
- isIdentifyEnabled → bool
-
True if the layer supports identify, false otherwise.
no setterinherited
- isTimeFilteringEnabled ↔ bool
-
True if the layer filters data based on its
GeoViewController.timeExtent, false otherwise.
getter/setter pairinherited
- isVisible ↔ bool
-
The layer content's visibility.
getter/setter pairinherited
- item → Item?
-
The item the layer has been created from.
no setterinherited
- labelsEnabled ↔ bool
-
True if features in the layer are labelled, otherwise false.
getter/setter pairinherited
- loadError → ArcGISException?
-
The load error.
no setterinherited
- loadStatus → LoadStatus
-
The load status.
no setterinherited
- maxScale ↔ double
-
The maximum scale for the layer.
getter/setter pairinherited
- minScale ↔ double
-
The minimum scale for the layer.
getter/setter pairinherited
- name ↔ String
-
The layer content's name.
getter/setter pairinherited
-
onFullTimeExtentChanged
→ Stream<
TimeExtent?> -
Sets the callback invoked when the full time extent of the object has
changed.
no setterinherited
-
onLoadStatusChanged
→ Stream<
LoadStatus> -
A stream that reports changes to the
LoadStatus
.no setterinherited -
onSubLayerContentChanged
→ Stream<
List< LayerContent> > -
Callback invoked when the sublayer content of the layer content have
changed.
no setterinherited
-
onVisibilityChanged
→ Stream<
bool> -
Callback invoked when the visibility of the layer changes.
no setterinherited
- opacity ↔ double
-
The opacity for the layer.
getter/setter pairinherited
- refreshInterval ↔ int
-
The objects refresh interval.
getter/setter pairinherited
- renderer ↔ Renderer?
-
The renderer specifies how the features are symbolized.
getter/setter pairinherited
- renderingMode ↔ FeatureRenderingMode
-
The mode defines how the feature layer is rendered.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleSymbols ↔ bool
-
True if the layer's symbols and labels honor the map's reference scale,
otherwise false.
getter/setter pairinherited
- showInLegend ↔ bool
-
A flag indicating whether the layer content participates in the legend.
getter/setter pairinherited
- spatialReference → SpatialReference?
-
The spatial reference of the layer.
no setterinherited
-
subLayerContents
→ List<
LayerContent> -
The sub layer contents of a layer content.
no setterinherited
-
subtypeSublayers
→ List<
SubtypeSublayer> -
The mutable collection of
SubtypeSublayer
.no setter - supportsTimeFiltering → bool
-
True if the layer supports filtering data based on its time values, false
otherwise.
no setterinherited
- tilingMode ↔ FeatureTilingMode
-
The mode defines whether feature tiling is used to retrieve the features
from the feature service.
getter/setter pairinherited
- timeInterval → TimeValue?
-
The suggested time slider step size for this time aware layer.
no setterinherited
- timeOffset ↔ TimeValue?
-
The amount of time by which the temporal values of this layer's data
points are offset when displaying it in a GeoViewController.
getter/setter pairinherited
Methods
-
cancelLoad(
) → void -
Cancels loading metadata for the object.
inherited
-
clearSelection(
) → void -
Clears all selected features.
inherited
-
clone(
) → Layer -
Clones this instance of the layer and its members.
inherited
-
fetchLegendInfos(
) → Future< List< LegendInfo> > -
Fetches the list of legend info.
inherited
-
getSelectedFeatures(
) → Future< FeatureQueryResult> -
Returns a collection of the currently selected features.
inherited
-
getSublayerWithSubtypeCode(
dynamic code) → SubtypeSublayer? - Finds a SubtypeSublayer for a feature subtype based on the FeatureSubtype.code.
-
getSublayerWithSubtypeName(
String name) → SubtypeSublayer? - Finds a SubtypeSublayer for a feature subtype based on the subtype name.
-
isVisibleAtScale(
double scale) → bool -
Returns the layer content's effective visibility at the specified scale.
inherited
-
load(
) → Future< void> -
Loads the metadata for the object asynchronously.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetFeaturesVisible(
) → void -
Reset the visibility of all features back to their original state.
inherited
-
resetRenderer(
) → void -
Reset the renderer back to the original renderer provided by the
FeatureTable.
inherited
-
retryLoad(
) → Future< void> -
Loads or retries loading metadata for the object asynchronously.
inherited
-
selectFeature(
Feature feature) → void -
Selects the given feature and adds it to the current collection of
selected features.
inherited
-
selectFeatures(
List< Feature> features) → void -
Selects the given features and adds them to the current collection of
selected features.
inherited
-
selectFeaturesWithQuery(
{required QueryParameters parameters, required SelectionMode mode}) → Future< FeatureQueryResult> -
Selects the features that match the criteria in the QueryParameters
object and adds them to the current collection of selected features.
inherited
-
setFeaturesVisible(
{required List< Feature> features, required bool visible}) → void -
Sets the visibility of the given features.
inherited
-
setFeatureVisible(
{required Feature feature, required bool visible}) → void -
Sets the visibility of the given feature.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unselectFeature(
Feature feature) → void -
Unselects the given feature and removes it from the current collection of
selected features.
inherited
-
unselectFeatures(
List< Feature> features) → void -
Unselects the given features and removes them from the current collection
of selected features.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited