@JsType(isNative=true) public class Layers extends Control
Modifier and Type | Method and Description |
---|---|
L |
addBaseLayer(ILayer layer,
java.lang.String name)
Adds a base layer (radio button entry) with the given name to the control.
|
L |
addOverlay(ILayer layer,
java.lang.String name)
Adds an overlay (checkbox entry) with the given name to the control.
|
static L |
clearAllEventListeners()
Clear all event listeners.
|
static L |
fire(java.lang.String type)
Fires an event of the specified type.
|
static L |
off(java.lang.String type,
Function fn)
the listener will only get fired once and then removed.
|
static L |
on(java.lang.String type,
Function fn)
Adds a set of type/listener pairs
|
static L |
once(java.lang.String type,
Function fn)
Once.
|
L |
removeLayer(ILayer layer)
Remove the given layer from the control.
|
addTo, getContainer, getPosition, onAdd, onRemove, removeFrom, setPosition
@JsMethod public L addBaseLayer(ILayer layer, java.lang.String name)
layer
- the layername
- the name@JsMethod public L addOverlay(ILayer layer, java.lang.String name)
layer
- the layername
- the name@JsMethod public L removeLayer(ILayer layer)
layer
- the layer@JsMethod public static L clearAllEventListeners()
@JsMethod public static L on(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L once(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L off(java.lang.String type, Function fn)
type
- the typefn
- the callback function@JsMethod public static L fire(java.lang.String type)
type
- the type