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 |
— |
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 |
Event manager. |
Events
Name |
Description |
The rectangular area was changed. |
|
The accessor was deleted from the margins manager. |
Methods
Name |
Returns |
Description |
getArea() |
Object |
Returns the rectangular area. |
remove() |
Deletes the rectangular area from the margins manager. |
|
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 |
— |
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
});
Mandatory parameter/option.