MapSubLayerSettings Class
Normalized representation of a MapSubLayerProps for which values have been validated and default values have been applied where explicit values not defined. A map sub layer represents a set of objects within the layer that can be controlled separately. These are produced only from map servers that produce images on demand and are not supported by tiled (cached) servers. This class can represent a hierarchy, in this case a sub layer is visible only if all its ancestors are also visible.
@see MapLayerSettings
Methods
Name | Description | |
---|---|---|
constructor(name: string, title?: string, visible?: boolean, id?: SubLayerId, parent?: SubLayerId, children?: SubLayerId[]): MapSubLayerSettings | ||
clone(changedProps: Partial<MapSubLayerProps>): MapSubLayerSettings | Creating a copy of this MapSubLayer, optionally modifying some if its properties | |
toJSON(): MapSubLayerProps | ||
fromJSON(json: MapSubLayerProps): MapSubLayerSettings Static | Construct from JSON, performing validation and applying default values for undefined fields. |
Properties
Name | Type | Description | |
---|---|---|---|
children Readonly | SubLayerId[] | undefined | One or more sublayer children | |
id Readonly | SubLayerId | A unique string or number that may be used to identify the sub layer (ArcGIS) | |
idString Accessor ReadOnly | string | return a string representing this sublayer id (converting to string if underlying id is number) | |
isLeaf Accessor ReadOnly | boolean | return true if this sublayer is a leaf (has no children) | |
isNamed Accessor ReadOnly | boolean | return true if this sublayer is named. | |
isUnnamedGroup Accessor ReadOnly | boolean | return true if this sublayer is an unnamed group | |
name Readonly | string | Typically Name is a single word used for machine-to-machine communication while the Title is for the benefit of humans (WMS) | |
parent Readonly | SubLayerId | undefined | sublayer parent. | |
title Readonly | string | undefined | Title. | |
visible Readonly | boolean | If true the sub layer is visible. |
Defined in
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.