LayersControl class
The layers control gives users the ability to switch between different base layers and switch overlays on/off.
Constructors
- LayersControl([dynamic baselayers, dynamic overlays, LayersControlOptions? options])
- Creates a layers control with the given layers.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addBaseLayer(
Layer layer, String name) → LayersControl - Adds a base layer (radio button entry) with the given name to the control.
-
addOverlay(
Layer layer, String name) → LayersControl - Adds an overlay (checkbox entry) with the given name to the control.
-
addTo(
LeafletMap map) → Control -
Adds the control to the given map.
inherited
-
collapse(
) → LayersControl - Collapse the control container if expanded.
-
expand(
) → LayersControl - Expand the control container if collapsed.
-
getContainer(
) → Element -
Returns the HTMLElement that contains the control.
inherited
-
getPosition(
) → String -
Returns the position of the control.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
) → Control -
Removes the control from the map it is currently active on.
inherited
-
removeLayer(
Layer layer) → LayersControl - Remove the given layer from the control.
-
setPosition(
String position) → Control -
Sets the position of the control.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited