AtlasCT.com
User Manual v5.0

Overlay

The Overlay class is used to add an HTML based overlay on the map.  In order to add an overlay on the map, you should create an overlay and add it to the map by the addOverlayToScreen or addOverlayToMap methods.


Summary
The Overlay class is used to add an HTML based overlay on the map.
The Overlay constructor.
Returns the dom element of the overlay.
Returns an HTML text of the overlay.
Returns the overlay offset position.
Sets the dom element of the overlay to be presented.
Sets an HTML text to the overlay.
Sets a new name to the overlay.
Sets an offset position to the overlay.

Constructors

Overlay

Overlay(string name)

The Overlay constructor.  Creates a new Overlay instance.

Parameters

nameThe name of the overlay

Methods

getDomElement

DomElement getDomElement()

Returns the dom element of the overlay.

Returns

The overlay dom element.

getHtml

string getHtml()

Returns an HTML text of the overlay.

Returns

The overlay HTML text.

getOffsetPosition

ScreenPoint getOffsetPosition()

Returns the overlay offset position.

Return

The overlay offset position.

setDomElement

setDomElement(DomElement domElement)

Sets the dom element of the overlay to be presented.

Parameters

domElementA dom element to be presented.

setHtml

setHtml(string html)

Sets an HTML text to the overlay.

Parameters

htmlA new HTML text.

setName

setName(string name)

Sets a new name to the overlay.

Parameters

nameA new name to the overlay.

setOffsetPosition

setOffsetPosition(ScreenPoint offsetPosition)

Sets an offset position to the overlay.  The offest position is used to determine the overlay anchored position above the map.  If you don’t set the offset position, the overlay will be placed above the map by the overlay’s top left coordinate.

Parameters

offsetPositionA new offset position.
Overlay(string name)
The Overlay constructor.
setName(string name)
Sets a new name to the overlay.
setDomElement(DomElement domElement)
Sets the dom element of the overlay to be presented.
DomElement getDomElement()
Returns the dom element of the overlay.
setHtml(string html)
Sets an HTML text to the overlay.
string getHtml()
Returns an HTML text of the overlay.
setOffsetPosition(ScreenPoint offsetPosition)
Sets an offset position to the overlay.
ScreenPoint getOffsetPosition()
Returns the overlay offset position.
t.addOverlayToScreen=function(overlay,
_anchor,
screenCoordinate,
zIndex)
Adds an overlay on top of the map referenced to the client screen.
The overlay position is fixed to screen (it won’t move in any map dragging).
The anchor and the offsetPosition parameters are used to determine alignment of the overlay above the map.
The offsetPosition is relative to the given anchor.
t.addOverlayToMap=function(overlay,
mapCoordinate,
centerMap,
zIndex)
Adds an overlay on top of the map referenced to the Map.
The ScreenPoint class represent a point on the viewport of the map by an X and Y coordinate in pixels.