map.margin.Accessor

An object that provides access to the rectangular area in the margins manager.

Constructor | Fields | Events | Methods

Constructor

map.margin.Accessor(screenArea)

Parameters:

Parameter

Default value

Description

screenArea*

Type: Object

The rectangular area, which is set in screen coordinates. This area is defined as an object containing information about the margins from the map edges (left, top, right, bottom) and the dimensions of the area (width, height). The values can be set as percentages of the width/height of the map container.

Don't instantiate new instances of this class unless necessary.

* Mandatory parameter/option.

Fields

Name

Type

Description

events

Event manager.

Events

Name

Description

change

The rectangular area was changed.

remove

The accessor was deleted from the margins manager.

Methods

Name

Returns

Description

getArea()

Object

Returns the rectangular area.

remove()

map.margin.Accessor

Deletes the rectangular area from the margins manager.

setArea(screenArea)

map.margin.Accessor

Returns self-reference.

Fields details

events

events

Event manager.

Events details

change

The rectangular area was changed.

remove

The accessor was deleted from the margins manager.

Methods details

getArea

{Object} getArea()

Returns the rectangular area.

remove

{map.margin.Accessor} remove()

Deletes the rectangular area from the margins manager.

Returns self-reference.

setArea

{map.margin.Accessor} setArea(screenArea)

Returns self-reference.

Parameters:

Parameter

Default value

Description

screenArea*

Type: Object

The rectangular area, which is set in screen coordinates. This area is defined as an object containing information about the margins from the map edges (left, top, right, bottom) and the dimensions of the area (width, height). The values can be set as percentages of the width/height of the map container.

* Mandatory parameter/option.

Example:

accessor.setArea({
    top: 50,
    left: 50,
    width: 100,
    height: 100
});