@JsType(isNative=true) public class Control extends Object
control.addTo(map);
// or
map.addControl(control);
Modifier | Constructor and Description |
---|---|
protected |
Control() |
Modifier and Type | Method and Description |
---|---|
L |
addTo(Map map)
Adds the control to the map.
|
elemental2.dom.HTMLElement |
getContainer()
Returns the HTML container of the control.
|
String |
getPosition()
Returns the current position of the control.
|
elemental2.dom.HTMLElement |
onAdd(Map map)
Should contain code that creates all the neccessary DOM elements for the control, adds listeners on relevant map events, and returns the element containing the control.
|
void |
onRemove(Map map)
Optional, should contain all clean up code (e.g.
|
L |
remove(Map map)
Removes the control from the map.
|
L |
setPosition(String position)
Sets the position of the control.
|
@JsMethod public L setPosition(String position)
position
- the position@JsMethod public String getPosition()
@JsMethod public L addTo(Map map)
map
- the map@JsMethod public elemental2.dom.HTMLElement getContainer()
public elemental2.dom.HTMLElement onAdd(Map map)
map
- the mappublic void onRemove(Map map)
map
- the mapCopyright © 2018 G-Widgets. All rights reserved.