-
Name Type Description options
Options.
Name Type Description svgPath
string | undefined String with SVG path.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path
. Programs as Adobe Illustrator can generate icons done with SVG.
Default:M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z
.
If you need help, you can send us which icon you want to convert to SVG.clickFunction
function | undefined Function to execute on click the control.
name
string | undefined Control name. You can get this control throught
getControlByName
method fromcercalia.Map
class.title
string | undefined Tooltip. Default '' (empty).
twoState
boolean | undefined Two state button if
true
. Defaultfalse
. In callback function you can get its state usingisEnabled()
function.
Extends
Methods
-
Disable control
-
Enable control
-
Returns
cercalia
Map objectReturns:
Cercalia map.
-
Get class name.
Returns:
Class name.
-
Get control HTML Element
Returns:
HTML Element
-
Get control id.
Returns:
Id.
-
Returns
mapboxgl
Map object -
Get control name. Null if control has not defined name.
Returns:
Class name.
-
Hide control.
-
Return if control is enabled. Only works when
twoState
option istrue
.Returns:
Returntrue
if button is enabled.
-
Show control.