-
featureEffect
FeatureEffect
autocast
- 自從:ArcGIS 適用於 JavaScript 4.22 的 API
featureEffect 可用於吸引感興趣的注意力特征。它允許通過 filter 選擇特征,並且將 includedEffect 和 excludedEffect 應用於分別通過或未通過過濾器要求的那些特征。
注意
- 如果需要將效果應用到整個圖層,請設置效果屬性。
- 如果在圖層上設置了
featureEffect
,它將被layerView.featureEffect
繼承,除非開發人員在圖層視圖上覆蓋它。如果設置了這兩個屬性,layerView.featureEffect
將優先於layer.featureEffect
。 - 如果應用了以下所有四個屬性,那麽它們將按以下順序應用:
featureEffect
、效果、不透明度和混合模式。
已知限製
- 以下場景不支持FeatureEffect:
- 在 3D 中SceneViews
- 在使用HeatmapRenderer 渲染的圖層中
- 當 FeatureReductionCluster 啟用時
- 有關已知的打印限製,請參閱print。
例子:
// 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%)" });
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/layers/FeatureLayer"], (FeatureLayer) => { /* code goes here */ });
ESM:
import FeatureLayer from "@arcgis/core/layers/FeatureLayer";
類:
esri/layers/FeatureLayer
繼承: FeatureLayer > Layer > Accessor
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
FeatureLayer.featureEffect
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS FeatureLayer.featureReduction用法及代碼示例
- JavaScript ArcGIS FeatureLayer.formTemplate用法及代碼示例
- JavaScript ArcGIS FeatureLayer.fullExtent用法及代碼示例
- JavaScript ArcGIS FeatureLayer.fields用法及代碼示例
- JavaScript ArcGIS FeatureLayer.fieldsIndex用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryExtent用法及代碼示例
- JavaScript ArcGIS FeatureLayer.when用法及代碼示例
- JavaScript ArcGIS FeatureLayer.getFieldDomain用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryFeatureCount用法及代碼示例
- JavaScript ArcGIS FeatureLayer.relationships用法及代碼示例
- JavaScript ArcGIS FeatureLayer.objectIdField用法及代碼示例
- JavaScript ArcGIS FeatureLayer.opacity用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryRelatedFeatures用法及代碼示例
- JavaScript ArcGIS FeatureLayer.datesInUnknownTimezone用法及代碼示例
- JavaScript ArcGIS FeatureLayer.timeInfo用法及代碼示例
- JavaScript ArcGIS FeatureLayer.createQuery用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryRelatedFeaturesCount用法及代碼示例
- JavaScript ArcGIS FeatureLayer.outFields用法及代碼示例
- JavaScript ArcGIS FeatureLayer.version用法及代碼示例
- JavaScript ArcGIS FeatureLayer.visible用法及代碼示例
- JavaScript ArcGIS FeatureLayer.labelingInfo用法及代碼示例
- JavaScript ArcGIS FeatureLayer.maxScale用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryTopObjectIds用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryTopFeatureCount用法及代碼示例
- JavaScript ArcGIS FeatureLayer.on用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 FeatureLayer.featureEffect。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。