new GeolocationButton( [options])
Parameters:
Name | Type | Argument | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
ol.interaction.GeolocationDraw option. Properties
|
Fires:
- event:tracking
Extends
Methods
-
getActive()
-
Test if the control is active.
- Inherited From:
- Overrides:
Returns:
.
- Type
- bool
-
getButtonElement()
-
Get the button element
- Inherited From:
- Overrides:
Returns:
- Type
- Element
-
getDisable()
-
Test if the control is disabled.
- Inherited From:
- Overrides:
Returns:
.
- Type
- bool
-
getInteraction()
-
Get the control interaction
- Inherited From:
- Overrides:
Returns:
interaction associated with the control
- Type
- _ol_interaction_
-
getSubBar()
-
Get the subbar associated with a control
- Inherited From:
- Overrides:
Returns:
- Type
- ol.control.Bar
-
setActive(b)
-
Change control state
Parameters:
Name Type Description b
bool activate or deactivate the control, default false
- Inherited From:
- Overrides:
-
setDisable(b)
-
Disable the control. If disable, the control will be deactivated too.
Parameters:
Name Type Description b
bool disable (or enable) the control, default false (enable)
- Inherited From:
- Overrides:
-
setHtml(html)
-
Set the button html
Parameters:
Name Type Description html
string - Inherited From:
- Overrides:
-
setInteraction(i)
-
Set the control interaction
Parameters:
Name Type Description i
_ol_interaction_ interaction to associate with the control
- Inherited From:
- Overrides:
-
setMap(map)
-
Set the map instance the control is associated with and add interaction attached to it to this map.
Parameters:
Name Type Description map
_ol_Map_ The map instance.
- Inherited From:
- Overrides:
-
setSubBar( [bar])
-
Set the subbar associated with a control
Parameters:
Name Type Argument Description bar
ol.control.Bar <optional>
a subbar if none remove the current subbar
- Inherited From:
- Overrides:
-
setTitle(title)
-
Set the button title
Parameters:
Name Type Description title
string - Inherited From:
- Overrides:
-
setVisible(b)
-
Set the control visibility
Parameters:
Name Type Description b
boolean - Inherited From:
- Overrides:
-
toggle()
-
Toggle control state active/deactive
- Inherited From:
- Overrides: