Class: Overlay

ol.control. Overlay


new Overlay( [options])

Control overlay for OL3 The overlay control is a control that display an overlay over the map

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

- className {String} class of the control
- hideOnClick {bool} hide the control on click, default false
- closeBox {bool} add a closeBox to the control, default false

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

setContent(html)

Set the content of the overlay

Parameters:
Name Type Description
html string

the html to display in the control (or a jQuery object)


show(html, coord)

Set the control visibility

Parameters:
Name Type Description
html string

the html to display in the control (or a jQuery object)

coord ol.coordinate

coordinate of the top left corner of the control to start from


toggle()

Toggle control visibility