IOverlay

Extends ICustomizable, IDomEventEmitter.

Interface for an overlay.

Constructor | Fields | Events | Methods

Constructor

IOverlay()

Fields

Name

Type

Description

events

IEventManager

Event manager.

Inherited from IDomEventEmitter.

options

IOptionManager

Options manager.

Inherited from ICustomizable.

Events

Name

Description

click

Single left-click on the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

contextmenu

Calls the element's context menu. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

datachange

Data change. Data fields:

  • oldData - Old data.
  • newData - New data.

dblclick

Double left-click on the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

emptinesschange

Change to the empty overlay flag. Instance of the Event class.

geometrychange

Changed geometry. Data fields:

  • oldGeometry - Old pixel geometry.
  • newGeometry - New pixel geometry.

mapchange

Map reference changed. Data fields:

  • oldMap - Old map.
  • newMap - New map.

mousedown

Pressing the mouse button over the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mouseenter

Pointing the cursor at the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mouseleave

Moving the cursor off of the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mousemove

Moving the cursor over the object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

mouseup

Letting go of the mouse button over an object. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

multitouchend

End of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface.

Inherited from IDomEventEmitter.

multitouchmove

Repeating event during multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Defines the touches property, which contains a list of touches. Every touch is described by an object that contains the following fields:

  • clientX - X coordinate of the touch relative to the viewable area of the browser.
  • clientY - Y coordinate of the touch relative to the viewable area of the browser.
  • pageX - X coordinate of the touch relative to the beginning of the document.
  • pageY - Y coordinate of the touch relative to the beginning of the document.

Inherited from IDomEventEmitter.

multitouchstart

Start of multitouch. This event is only available on devices that support multitouch. Returns an implementation of the IMultiTouchEvent interface with information about touches. Defines the touches property, which contains a list of touches. Every touch is described by an object that contains the following fields:

  • clientX - X coordinate of the touch relative to the viewable area of the browser.
  • clientY - Y coordinate of the touch relative to the viewable area of the browser.
  • pageX - X coordinate of the touch relative to the beginning of the document.
  • pageY - Y coordinate of the touch relative to the beginning of the document.

Inherited from IDomEventEmitter.

optionschange

Change to the object options.

Inherited from ICustomizable.

shapechange

Change to the shape of the area spanning the overlay. Instance of the Event class.

wheel

Mouse wheel scrolling. When using, keep in mind that mouse events are emulated when a touch screen is used. Instance of the MapEvent class. More information is available in domEvent.manager.

Inherited from IDomEventEmitter.

Methods

Name

Returns

Description

getData()

Object

Returns the overlay data object.

getGeometry()

IPixelGeometry

Returns the current pixel geometry.

getMap()

Map|null

Returns reference to the current map.

getShape()

IShape|null

Returns a shape that defines the area spanning the overlay in global pixel coordinates, or null if it is not possible to plot the shape.

isEmpty()

Boolean

Returns true if the layout is empty, i.e. it does not have any content. This indicator is used for hiding empty objects such as hints, balloons, and others.

setData(data)

Sets the overlay data.

setGeometry(geometry)

Sets the overlay pixel geometry.

setMap(map)

Sets the map on which to display the overlay.

Events details

datachange

Data change. Data fields:

  • oldData - Old data.
  • newData - New data.

emptinesschange

Change to the empty overlay flag. Instance of the Event class.

geometrychange

Changed geometry. Data fields:

  • oldGeometry - Old pixel geometry.
  • newGeometry - New pixel geometry.

mapchange

Map reference changed. Data fields:

  • oldMap - Old map.
  • newMap - New map.

shapechange

Change to the shape of the area spanning the overlay. Instance of the Event class.

Methods details

getData

{Object} getData()

Returns the overlay data object.

getGeometry

{IPixelGeometry} getGeometry()

Returns the current pixel geometry.

getMap

{Map|null} getMap()

Returns reference to the current map.

getShape

{IShape|null} getShape()

Returns a shape that defines the area spanning the overlay in global pixel coordinates, or null if it is not possible to plot the shape.

isEmpty

{Boolean} isEmpty()

Returns true if the layout is empty, i.e. it does not have any content. This indicator is used for hiding empty objects such as hints, balloons, and others.

setData

{} setData(data)

Sets the overlay data.

Parameters:

Parameter

Default value

Description

data*

—

Type: Object

Overlay data.

* Mandatory parameter/option.

setGeometry

{} setGeometry(geometry)

Sets the overlay pixel geometry.

Parameters:

Parameter

Default value

Description

geometry*

—

Type: IPixelGeometry

The geometry in global pixel coordinates.

* Mandatory parameter/option.

setMap

{} setMap(map)

Sets the map on which to display the overlay.

Parameters:

Parameter

Default value

Description

map*

—

Type: Map|null

Reference to the map.

* Mandatory parameter/option.