Documentation
Reference
2.1.55 (current version)
collection
interactivityModel
Interfaces

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:

ParameterDefault valueDescription
screenArea *
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

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

NameTypeDescription
events

Event manager.

Events

NameDescription
change

The rectangular area was changed.

remove

The accessor was deleted from the margins manager.

Methods

NameReturnsDescription
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

Deletes the rectangular area from the margins manager.

Returns self-reference.

setArea

Returns self-reference.

Parameters:

ParameterDefault valueDescription
screenArea*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

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
});