Class LayersControlOptions
java.lang.Object
org.vaadin.addons.componentfactory.leaflet.controls.LayersControlOptions
- All Implemented Interfaces:
Serializable
Configuration options for a
LayersControl.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets whether the z-index of the layers is set automatically based on their order in the control.booleanGets whether the control is initially collapsed into an icon and expanded on mouse hover or touch.booleanGets whether the base layers section is hidden when there is only a single base layer.booleanGets whether the layers are sorted by name in the control.voidsetAutoZIndex(boolean autoZIndex) Sets whether the z-index of the layers is set automatically based on their order in the control, enabling a correct display order for overlays.voidsetCollapsed(boolean collapsed) Sets whether the control is initially collapsed into an icon and expanded on mouse hover or touch.voidsetHideSingleBase(boolean hideSingleBase) Sets whether the base layers section is hidden when there is only a single base layer.voidsetSortLayers(boolean sortLayers) Sets whether the layers are sorted by name in the control.
-
Constructor Details
-
LayersControlOptions
public LayersControlOptions()
-
-
Method Details
-
isCollapsed
public boolean isCollapsed()Gets whether the control is initially collapsed into an icon and expanded on mouse hover or touch.- Returns:
trueif the control is collapsed,falseotherwise
-
setCollapsed
public void setCollapsed(boolean collapsed) Sets whether the control is initially collapsed into an icon and expanded on mouse hover or touch.- Parameters:
collapsed-trueto collapse the control,falseotherwise
-
isAutoZIndex
public boolean isAutoZIndex()Gets whether the z-index of the layers is set automatically based on their order in the control.- Returns:
trueif the z-index is set automatically,falseotherwise
-
setAutoZIndex
public void setAutoZIndex(boolean autoZIndex) Sets whether the z-index of the layers is set automatically based on their order in the control, enabling a correct display order for overlays.- Parameters:
autoZIndex-trueto set the z-index automatically,falseotherwise
-
isHideSingleBase
public boolean isHideSingleBase()Gets whether the base layers section is hidden when there is only a single base layer.- Returns:
trueif a single base layer is hidden,falseotherwise
-
setHideSingleBase
public void setHideSingleBase(boolean hideSingleBase) Sets whether the base layers section is hidden when there is only a single base layer.- Parameters:
hideSingleBase-trueto hide a single base layer,falseotherwise
-
isSortLayers
public boolean isSortLayers()Gets whether the layers are sorted by name in the control.- Returns:
trueif the layers are sorted,falseotherwise
-
setSortLayers
public void setSortLayers(boolean sortLayers) Sets whether the layers are sorted by name in the control.- Parameters:
sortLayers-trueto sort the layers,falseotherwise
-