new Placemark(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Extend ol/Overlay/Popup options Properties
|
Example
var popup = new ol.Overlay.Placemark(); map.addOverlay(popup); popup.show(coordinate); popup.hide();
Extends
Methods
-
setBackgroundColor(color)
-
Set the placemark background color.
Parameters:
Name Type Description color
string -
setClassName(name)
-
Set the placemark class.
Parameters:
Name Type Description name
string -
setColor(color)
-
Set the placemark color.
Parameters:
Name Type Description color
string -
setContentColor(color)
-
Set the placemark content color.
Parameters:
Name Type Description color
string -
setRadius(size)
-
Set the placemark radius.
Parameters:
Name Type Description size
number size in pixel
-
show(coordinate, html)
-
Set the position and the content of the placemark (hide it before to enable animation).
Parameters:
Name Type Description coordinate
ol.Coordinate | string the coordinate of the popup or the HTML content.
html
string | undefined the HTML content (undefined = previous content).