Skip to content
Types
import type { FeatureEffectLayer } from "@arcgis/core/layers/mixins/FeatureEffectLayer.js";
Subclasses:
CSVLayer, FeatureLayer, GeoJSONLayer, OGCFeatureLayer, ParquetLayer, StreamLayer, WFSLayer, CatalogFootprintLayer, KnowledgeGraphSublayer
Since
ArcGIS Maps SDK for JavaScript 4.22

FeatureEffectLayer is a mixin that adds featureEffect properties to a layer.

Properties

PropertyTypeClass

featureEffect

autocast Property
Type
FeatureEffect | null | undefined

The featureEffect can be used to draw attention to features of interest. It allows for the selection of features via a filter, and an includedEffect and excludedEffect are applied to those features that respectively pass or fail the filter requirements.

Notes

  • Set the effect property if the effect needs to be applied to the entire layer.
  • If the featureEffect is set on the layer, it will be inherited by layerView.featureEffect unless the developer overrides it on the layer view. The layerView.featureEffect will take precedence over layer.featureEffect if both properties are set.
  • If all of the following four properties are applied, then they will be applied in this order: featureEffect, effect, opacity and blendMode.

Known Limitations

FeatureEffect is not supported in the following scenarios:

See also
Examples
// gray out features that fall outside of the 3 mile buffer of the mouse's location
// by setting feature effect on excluded features
layer.featureEffect = new FeatureEffect({
filter: new FeatureFilter({
geometry: filterGeometry,
spatialRelationship: "intersects",
distance: 3,
units: "miles"
}),
excludedEffect: "grayscale(100%) opacity(30%)"
});
// Apply a drop-shadow feature effect to the features that intersect the borough boundaries,
// while applying blur and brightness effects to the features that are excluded from filter criteria.
// The resulting map will make it easier to spot if the residents are more likely to experience deprivation
// if they live on a borough boundary.
const featureFilter = new FeatureFilter({
where: "BoroughEdge='true'"
});
layer.featureEffect = new FeatureEffect({
filter: featureFilter,
includedEffect: "drop-shadow(3px, 3px, 3px, black)",
excludedEffect: "blur(1px) brightness(65%)"
});