Class: MapDecoration

OM.control. MapDecoration


new MapDecoration(content, options)

An abstract class for map decorations.

Parameters:
Name Type Description
content String

An html string defines the decoration content.

options Object

An object, or literal, with either of the following attributes:


  • offsetX {int} in pixels to the dock icon

  • offsetY {int} in pixels to the dock icon

  • draggable {boolean} True if draggable, false if fixed.

  • collapsible {boolean} defines the collapsible value true/false

  • width {int} Decoration width in pixels

  • height {int} Decoration height in pixels

  • title {Sting} the title of the decoration

  • titleStyle {Object}: A CSS definition for the Decoration title style. For example:
    titleStyle:{"border-style":"solid",
    "border-color":"#391EA6",
    "border-width":"1px",
    "backgroundColor":"#0D0D0D",
    "font-size":"18px",
    "font-weight":"bold",
    "color":"#FDFDFD"
    }

  • contentStyle {Object}: A CSS definition for the Decoration content style. For example:
    contentStyle: {"border-style":"solid",
    "border-color":"#101418",
    "border-width":"2px",
    "padding":"0px",
    "font-size":"16px",
    "color":"#000000",
    "backgroundColor":"#FDFDFD"
    }

Mixes In:
Returns:

An instance of OM.control.MapDecoration

Type
OM.control.MapDecoration

Methods


isVisible()

Get the visibility of the decoration.

Returns:

True if the decoration is currently visible,
False if the decoration is currently not visible.

Type
Boolean

on()

A shorthand name for the member function addListener.

Mixes In:

setDraggable()

Set whether the decoration should be draggable

Parameters:
Name Type Description
draggable. Boolean

True if draggable, false if not.

Returns:
Type
void

setPosition(offsetX, offsetY)

Set the map decoration position

Parameters:
Name Type Description
offsetX Float

in pixels to the dock icon if the value is greater than 1, or percentage if it is less than 1.

offsetY Float

in pixels to the dock icon if the value is greater than 1, or percentage if it is less than 1.

Returns:
Type
void

setSize(width, height)

Set the map decoration size

Parameters:
Name Type Description
width int
height int
Returns:
Type
void

setVisible(visible)

Set the visibility.

Parameters:
Name Type Description
visible Boolean

True if visible, false if not.

Returns:
Type
void