-
respectLayerVisibility
Boolean
- 自從:ArcGIS 適用於 JavaScript 4.13 的 API
確定是否尊重Map中控製圖例可見性的圖層屬性 (
minScale
,maxScale
,legendEnabled
)。默認情況下,圖層的圖例元素不會渲染在給出以下條件的圖例中:- 圖層的 legendEnabled 屬性設置為
false
。 - 如果視圖的比例超出圖層的minScale 和maxScale 屬性定義的可見範圍。
當圖例的
respectLayerVisibility
屬性設置為false
時,Map中每個圖層的圖例元素將始終顯示,因此忽略Map中每個圖層的minScale
、maxScale
和legendEnabled
屬性Map。默認值:true
例子:
// Always displays legend elements for the map's layers // regardless of their minScale, maxScale, and legendEnabled properties legend.respectLayerVisibility = false;
- 圖層的 legendEnabled 屬性設置為
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/widgets/Legend"], (Legend) => { /* code goes here */ });
ESM:
import Legend from "@arcgis/core/widgets/Legend";
類:
esri/widgets/Legend
繼承: Legend > Widget > Accessor
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
Legend.respectLayerVisibility
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Legend.classes用法及代碼示例
- JavaScript ArcGIS Legend.style用法及代碼示例
- JavaScript ArcGIS Legend.hideLayersNotInCurrentView用法及代碼示例
- JavaScript ArcGIS Legend.container用法及代碼示例
- JavaScript ArcGIS Legend.basemapLegendVisible用法及代碼示例
- JavaScript ArcGIS Legend.when用法及代碼示例
- JavaScript ArcGIS Legend.headingLevel用法及代碼示例
- JavaScript ArcGIS Legend.on用法及代碼示例
- JavaScript ArcGIS Legend.visible用法及代碼示例
- JavaScript ArcGIS Legend用法及代碼示例
- JavaScript ArcGIS LabelClass.repeatLabelDistance用法及代碼示例
- JavaScript ArcGIS LineOfSight.on用法及代碼示例
- JavaScript ArcGIS LineOfSight.classes用法及代碼示例
- JavaScript ArcGIS LabelSymbol3D.callout用法及代碼示例
- JavaScript ArcGIS Layer.opacity用法及代碼示例
- JavaScript ArcGIS Locate.locate用法及代碼示例
- JavaScript ArcGIS LabelSymbol3D.verticalOffset用法及代碼示例
- JavaScript ArcGIS LayerList.classes用法及代碼示例
- JavaScript ArcGIS Locator.addressesToLocations用法及代碼示例
- JavaScript ArcGIS LineSymbol3DLayer.size用法及代碼示例
- JavaScript ArcGIS Locate.visible用法及代碼示例
- JavaScript ArcGIS LabelSymbol3D用法及代碼示例
- JavaScript ArcGIS LineOfSightAnalysis用法及代碼示例
- JavaScript ArcGIS LineOfSightAnalysisView3D用法及代碼示例
- JavaScript ArcGIS LabelClass.clone用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Legend.respectLayerVisibility。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。