@JsType(isNative=true) public class Control extends java.lang.Object implements IControl
control.addTo(map);
// or
map.addControl(control);
Modifier and Type | Method and Description |
---|---|
L |
addTo(Map map)
Adds the control to the map.
|
HTMLElement |
getContainer()
Returns the HTML container of the control.
|
java.lang.String |
getPosition()
Returns the current position of the control.
|
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 |
removeFrom(Map map)
Removes the control from the map.
|
L |
setPosition(java.lang.String position)
Sets the position of the control.
|
@JsMethod public L setPosition(java.lang.String position)
position
- the position@JsMethod public java.lang.String getPosition()
@JsMethod public L addTo(Map map)
map
- the map@JsMethod public L removeFrom(Map map)
map
- the map@JsMethod public HTMLElement getContainer()
@JsMethod public HTMLElement onAdd(Map map)
IControl