Class: Button

ol.control. Button

A simple push button control


new Button( [options])

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
className String

class of the control

title String

title of the control

name String

an optional name, default none

html String

html to insert in the control

handleClick function

callback when control is clicked (or use change:active event)

Extends

Methods


getButtonElement()

Get the button element

Returns:
Type
Element

setHtml(html)

Set the button html

Parameters:
Name Type Description
html string

setTitle(title)

Set the button title

Parameters:
Name Type Description
title string

setVisible(b)

Set the control visibility

Parameters:
Name Type Description
b boolean