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:
|
- Mixes In:
Returns:
An instance of 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