Class: Overlay

ol.control. Overlay

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


new Overlay( [options])

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
className String

class of the control

content String | Element
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

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