MMapLayer

The MMapLayer class is a container class responsible for creating and managing layers on the map.

Creating a layer

// Creating a map
const map = new MMap(...);

// Creating a layer
const layer = new MMapLayer(...);

// Adding the layer to the map
map.addChild(layer);

Example of adding a layer to the map.

Constructor

new MMapLayer(props)

Constructor parameters

Parameter

Type

Description

props

MMapLayerProps

Value of input props.

Inherited from

MMapEntity.constructor

Props

MMapLayerProps: Object

Parameters

Name

Type

Description

grouppedWith?

string

ID of the layer for managing the order in the parent group.

id?

string

Layer ID.

implementation?

LayerImplementationClasses

Method for determining a custom layer implementation.

options?

{ raster?: RasterLayerOptions }

Layer parameters.

options.raster?

RasterLayerOptions

-

source?

string

Layer source.

type

string

Layer type. Use "ground" for tile data sources.

zIndex?

number

Z-index of the layer for managing the order of layers. Default value: 1500.

Methods

update

update(changedProps): void

Method of updating object props.

Parameters

Parameter

Type

Description

changedProps

Partial<MMapLayerProps>

New props values.

Returns

void

Inherited from

MMapEntity.update