new Overlay( [options])
Parameters:
Name | Type | Argument | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Control options. Properties
|
Extends
Methods
-
getVisible()
-
Get the control visibility
Returns:
b
- Type
- boolean
-
hide()
-
Set the control visibility hidden
-
setClass(className)
-
Change class name
Parameters:
Name Type Description className
String a class name or a list of class names separated by a space
-
setContent(html)
-
Set the content of the overlay
Parameters:
Name Type Description html
string | Element the html to display in the control
-
show(html, coord)
-
Set the control visibility
Parameters:
Name Type Description html
string | Element the html to display in the control
coord
ol.coordinate coordinate of the top left corner of the control to start from
-
showImage(src, options, coordinate)
-
Show an image
Parameters:
Name Type Description src
string image url
options
* Properties
Name Type Description title
string coordinate
ol.coordinate -
toggle()
-
Toggle control visibility