map.pane.Manager

Map pane manager. Each map already has its own pane manager, available as map.panes. Don't create new instances of this class unless necessary. The list of default keys for map panes and their zIndex values:

  • 'ground': pane.MovablePane (zIndex: 100) - The lowest pane, intended for the map's base layer.
  • 'areas': pane.MovablePane (zIndex: 200) - Pane for objects with an area, like a polygon.
  • 'shadows': pane.MovablePane (zIndex: 300) - Pane for the shadows of map objects that are above it.
  • 'places': pane.MovablePane (zIndex: 400) - Pane for point objects, such as placemarks.
  • 'events': pane.EventsPane (zIndex: 500) - Pane for listening to map events.
  • 'overlaps': pane.MovablePane (zIndex: 600) - Pane for objects that don't require hotspots to make them interactive.
  • 'balloon': pane.MovablePane (zIndex: 700) - Balloon pane.
  • 'outerBalloon': pane.MovablePane (zIndex: 800) - External balloon pane.
  • 'controls': pane.StaticPane (zIndex: 900) - Map controls pane.
  • 'hint': pane.StaticPane (zIndex: 1100) - Hint pane.
  • 'outerHint': pane.StaticPane (zIndex: 1200) - External hint pane.

See Map.panes

Constructor | Methods

Constructor

map.pane.Manager(map)

Parameters:

Parameter

Default value

Description

map*

Type: Map

Map.

* Mandatory parameter/option.

Example:

// Adding a watermark on top of the map container.
// To do this, we will change the event container's background.
map.panes.get('events').getElement().style.backgroundImage = 'my/background/image';

Methods

Name

Returns

Description

append(key, pane)

Adds a new pane to the map. The key of the pane being added must be unique within the current set of keys for the map panes.

destroy()

Destructor.

get(key)

IPane|null

Returns either the map pane with the given key, or null, if the requested pane is not available on the map.

getLower()

String

Takes the keys of map panes as arguments and returns the key of the lowest pane in the received set. If no key was specified, the search is performed on the entire set of map panes.

getUpper()

String

Takes the keys of map panes as arguments and returns the key of the top pane in the received set. If no key was specified, the search is performed on the entire set of map panes.

insertBefore(key, pane, referenceKey)

Inserts a new pane in front of another map pane. The key of the pane being added must be unique within the current set of keys for the map panes.

remove(pane)

Deletes a pane from the map.

Methods details

append

{} append(key, pane)

Adds a new pane to the map. The key of the pane being added must be unique within the current set of keys for the map panes.

Parameters:

Parameter

Default value

Description

key*

Type: String

The key of the pane being added.

pane*

Type: IPane

The pane being added.

* Mandatory parameter/option.

destroy

{} destroy()

Destructor.

get

{IPane|null} get(key)

Returns either the map pane with the given key, or null, if the requested pane is not available on the map.

Parameters:

Parameter

Default value

Description

key*

Type: String

The pane key.

* Mandatory parameter/option.

getLower

{String} getLower()

Takes the keys of map panes as arguments and returns the key of the lowest pane in the received set. If no key was specified, the search is performed on the entire set of map panes.

Returns the key for the lowest map pane.

getUpper

{String} getUpper()

Takes the keys of map panes as arguments and returns the key of the top pane in the received set. If no key was specified, the search is performed on the entire set of map panes.

Returns the key for the uppermost map pane.

insertBefore

{} insertBefore(key, pane, referenceKey)

Inserts a new pane in front of another map pane. The key of the pane being added must be unique within the current set of keys for the map panes.

Parameters:

Parameter

Default value

Description

key*

Type: String

The key of the pane being added.

pane*

Type: IPane

The pane being added.

referenceKey*

Type: String

The key of the pane to insert the new pane in front of.

* Mandatory parameter/option.

remove

{} remove(pane)

Deletes a pane from the map.

Parameters:

Parameter

Default value

Description

pane*

Type: IPane

The pane being deleted.

* Mandatory parameter/option.