LayerItem class
A layer object in the map
Signature:export declare class LayerItem
Events
| Property | Modifiers | Type | Description |
|---|---|---|---|
| VisibilityChanged | readonly | GAEvent<GAEventArgs> | Triggered when the visibility of the layer is changed, based on the zoom levels |
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(map, categoryType, displayType, parentLayer) | Constructs a new instance of the LayerItem class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| CategoryType | readonly | LayerCategoryType | Retrieve the layer category type |
| ChildLayers | readonly | LayerItem[] | Get the childlayers |
| DisplayType | readonly | LayerDisplayType | Retrieve the layer display type |
| Enabled | boolean | Retrieve whether or not the layer is enabled | |
| IsVisible | readonly | boolean | Indicate whether the layer is visible or not, based on the zoom levels of the map |
| Layer | Layer | Reference to layer object | |
| LayerItemId | string | Unique id of layer item | |
| Opacity | number | Retrieve the current opacity of the layer | |
| ShowInLegend | boolean | Whether to show layer item in legend | |
| ShowSymbology | boolean | Whether to show layer item's symbology in legend | |
| Symbology | Symbology | Reference to symbology object | |
| Title | string | Title of the layer item |
Methods
| Method | Modifiers | Description |
|---|---|---|
| ApplyFilter(filters) | Apply a filter on the layer | |
| ApplyFilter2(filter) | Apply a filter on the layer | |
| ClearFilter() | Remove filter from specified layer | |
| EnableHover(enable, options) | Enable hover on the layer, which shows a pointer cursor when hovering a layer | |
| GetChildLayerItem(layerItemId, recursive) | Retrieve a child layer item | |
| GetFeatureById(id) | Retrieve the features specified by the filter in the parameter | |
| GetFeaturesAtPixel(coordinate) | Retrieve the features found at the specified coordinate | |
| GetFeaturesByFilter(filter) | Retrieve the features specified by the filter in the parameter | |
| GetFeaturesByFilter2(filter) | Retrieve the features specified by the filter in the parameter | |
| Refresh() | Refresh the data on the map | |
| ToggleEnabled() | Toggle enabled state of the layer | |
| ToggleSymbologyUI() | Toggle the state of the symbology UI | |
| UpdateSymbologyUI(visible) | Enable or disable the symbology UI |