Class
JimuLayerView is the wrapper class for ArcGIS Maps SDK for JavaScript Layer and LayerView .
It is created by a JimuMapView using a layer DataSource .
A layer view may have a related data source. If it has the data source, the feature selection will be synced to data source selection and will use the data source URL params. If it does not have the data source, the feature selection will use the feature_selection URL param.
Properties
| Property | Type | Notes |
|---|---|---|
fromRuntime | boolean | true means the JimuLayerView is created from runtime. e.g. The JimuLayerView is created by AddData widget at runtime. false means the layer is a builtin layer of WebMap or WebScene. |
id | string | The id of the JimuLayerView instance. It connects the JimuMapView.id and the JimuLayerId with "-" |
index | number | The order defined in the webmap |
jimuMapViewId | string | The jimuMapViewId is the corresponding JimuMapView instance id. |
layer | any | The layer is the corresponding layer object in ArcGIS JavaScript API View.map. |
layerDataSourceId | string | The layerDataSourceId is the corresponding data source id. This id always has value, but the layer data source may not be created. |
type | string | The layer type, see ArcGIS Maps SDK for JavaScript Layer type. |
view | BuildingComponentSublayerView | LayerView | The |
fromRuntime
Class PropertyfromRuntime: booleantrue means the JimuLayerView is created from runtime. e.g. The JimuLayerView is created by AddData widget at runtime. false means the layer is a builtin layer of WebMap or WebScene.
id
Class Propertyid: stringThe id of the JimuLayerView instance. It connects the JimuMapView.id and the JimuLayerId with "-"
jimuMapViewId
Class PropertyjimuMapViewId: stringThe jimuMapViewId is the corresponding JimuMapView instance id.
layer
Class Propertylayer: anyThe layer is the corresponding layer object in ArcGIS JavaScript API View.map.
layerDataSourceId
Class PropertylayerDataSourceId: stringThe layerDataSourceId is the corresponding data source id. This id always has value, but the layer data source may not be created.
type
Class Propertytype: stringThe layer type, see ArcGIS Maps SDK for JavaScript Layer type.
view
Class Propertyview: BuildingComponentSublayerView | LayerViewThe view is the ArcGIS Maps SDK for JavaScript LayerView
or BuildingComponentSublayerView .
Methods
| Method | Returns | Notes |
|---|---|---|
createLayerDataSource() | Promise<DataSource> | Create corresponding data source for the layer. |
destroy() | void | Destroy the JimuLayerView instance. |
getAllAncestorJimuLayerViews() | JimuLayerView[] | Get all ancestor JimuLayerViews. |
getJimuMapView() | JimuMapView | Get the JimuMapView that the current JimuLayerView belongs to. |
getLayerDataSource() | DataSource | Return the corresponding data source of the layer. |
getMapDataSource() | MapDataSource | Get the map data source of the layer. |
getMapSceneView() | MapView | SceneView | Return the MapView or SceneView of the layer view. |
getParentJimuLayerView() | JimuLayerView | Get parent JimuLayerView. |
isLayerVisible() | boolean | If any layer in the layer tree is invisible, the layer is considered invisible. |
createLayerDataSource
Class MethodcreateLayerDataSource(): Promise<DataSource>Create corresponding data source for the layer.
Returns
Promise<DataSource>getAllAncestorJimuLayerViews
Class MethodgetAllAncestorJimuLayerViews(): JimuLayerView[]Get all ancestor JimuLayerViews.
Returns
JimuLayerView[]getJimuMapView
Class MethodgetJimuMapView(): JimuMapViewGet the JimuMapView that the current JimuLayerView belongs to.
Returns
JimuMapViewgetLayerDataSource
Class MethodgetLayerDataSource(): DataSourceReturn the corresponding data source of the layer.
Returns
DataSourcegetMapDataSource
Class MethodgetMapDataSource(): MapDataSourceGet the map data source of the layer.
Returns
MapDataSourcegetMapSceneView
Class MethodgetMapSceneView(): MapView | SceneViewReturn the MapView or SceneView of the layer view.
Returns
MapView | SceneViewgetParentJimuLayerView
Class MethodgetParentJimuLayerView(): JimuLayerViewGet parent JimuLayerView.
Returns
JimuLayerView