HtmlForgeX

API Reference

Class

LeafletLayerControlSettings

Namespace HtmlForgeX
Assembly HtmlForgeX
Modifiers sealed

Settings sub-builder for Leaflet layer control (base layers + overlay toggles).

Inheritance

  • Object
  • LeafletLayerControlSettings

Methods

BaseLayer 2 overloads
public LeafletLayerControlSettings BaseLayer(String name, LeafletTileProvider provider, Boolean selected = false) #
Returns: LeafletLayerControlSettings

Adds an additional base tile layer to the control (radio selection). When any base layers are configured, HtmlForgeX will include the current map tile provider as the default base layer unless Boolean) is enabled.

Parameters

name System.String requiredposition: 0
provider HtmlForgeX.LeafletTileProvider requiredposition: 1
selected System.Boolean = false optionalposition: 2
public LeafletLayerControlSettings BaseLayer(String name, String urlTemplate, String attribution, Boolean selected = false) #
Returns: LeafletLayerControlSettings

Adds an additional base tile layer to the control (radio selection).

Parameters

name System.String requiredposition: 0
urlTemplate System.String requiredposition: 1
attribution System.String requiredposition: 2
selected System.Boolean = false optionalposition: 3
public LeafletLayerControlSettings Collapsed(Boolean collapsed = true) #
Returns: LeafletLayerControlSettings

Sets whether the layer control is collapsed by default.

Parameters

collapsed System.Boolean = true optionalposition: 0
public LeafletLayerControlSettings DefaultBaseLayerName(String name) #
Returns: LeafletLayerControlSettings

Sets the display name for the current map tile provider when it is included as the default base layer.

Parameters

name System.String requiredposition: 0
public LeafletMapSettings End() #
Returns: LeafletMapSettings

Return to parent settings.

public LeafletLayerControlSettings Group(String groupName, Action<LeafletLayerGroupSettings> configure) #
Returns: LeafletLayerControlSettings

Configures ordering/label/initial visibility for an overlay group name.

Parameters

groupName System.String requiredposition: 0
configure System.Action{HtmlForgeX.LeafletLayerGroupSettings} requiredposition: 1
public LeafletLayerControlSettings IncludeUngroupedMarkers(Boolean include = true, String label = "Markers") #
Returns: LeafletLayerControlSettings

Configures whether ungrouped markers should appear as a toggleable overlay.

Parameters

include System.Boolean = true optionalposition: 0
label System.String = "Markers" optionalposition: 1
public LeafletLayerControlSettings Position(LeafletControlPosition position) #
Returns: LeafletLayerControlSettings

Sets control position (defaults to TopRight).

Parameters

position HtmlForgeX.LeafletControlPosition requiredposition: 0
public LeafletLayerControlSettings UseOnlyConfiguredBaseLayers(Boolean enable = true) #
Returns: LeafletLayerControlSettings

When enabled, the base layers list will contain only the layers explicitly configured via Boolean).

Parameters

enable System.Boolean = true optionalposition: 0