Class MapsuiLayerBands
Owns the ordered basemap, dataset, overlay, and tool layer bands of a Mapsui.Map.
public sealed class MapsuiLayerBands : IMapsuiOverlayLayerHost, IS100MapLayerHost
- Inheritance
-
MapsuiLayerBands
- Implements
- Inherited Members
Remarks
The component mutates the supplied map directly and does not marshal calls to a UI thread. UI-framework hosts remain responsible for invoking it from the thread required by their map control.
Constructors
MapsuiLayerBands(Map)
Creates layer-band bookkeeping for map.
public MapsuiLayerBands(Map map)
Parameters
mapMapThe Mapsui map whose layers are managed.
Exceptions
- ArgumentNullException
mapis null.
Methods
AddDatasetLayer(ILayer)
Adds a layer to the dataset band.
public void AddDatasetLayer(ILayer layer)
Parameters
layerILayerThe dataset layer to add.
Exceptions
- ArgumentNullException
layeris null.- ArgumentException
layerbelongs to another managed band or is already present in the map.
AddOverlayLayer(ILayer)
Adds a layer to the overlay band above all dataset layers.
public void AddOverlayLayer(ILayer layer)
Parameters
layerILayerThe overlay layer to add.
Exceptions
- ArgumentNullException
layeris null.- ArgumentException
layerbelongs to another managed band or is already present in the map.
AddToolLayer(ILayer)
Adds a layer to the topmost tool band.
public void AddToolLayer(ILayer layer)
Parameters
layerILayerThe tool layer to add.
Exceptions
- ArgumentNullException
layeris null.- ArgumentException
layerbelongs to another managed band or is already present in the map.
RemoveDatasetLayer(ILayer)
Removes a layer from the dataset band.
public void RemoveDatasetLayer(ILayer layer)
Parameters
layerILayerThe dataset layer to remove.
Exceptions
- ArgumentNullException
layeris null.
RemoveOverlayLayer(ILayer)
Removes a layer from the overlay band.
public void RemoveOverlayLayer(ILayer layer)
Parameters
layerILayerThe overlay layer to remove.
Exceptions
- ArgumentNullException
layeris null.
RemoveToolLayer(ILayer)
Removes a layer from the tool band.
public void RemoveToolLayer(ILayer layer)
Parameters
layerILayerThe tool layer to remove.
Exceptions
- ArgumentNullException
layeris null.
ReplaceDatasetLayers(IReadOnlyList<ILayer>)
Replaces the complete dataset band with
orderedDatasetLayers.
public void ReplaceDatasetLayers(IReadOnlyList<ILayer> orderedDatasetLayers)
Parameters
orderedDatasetLayersIReadOnlyList<ILayer>The authoritative dataset layers in bottom-to-top order.
Exceptions
- ArgumentNullException
orderedDatasetLayersis null.- ArgumentException
The sequence contains a null, duplicate, basemap, overlay, tool, or unmanaged layer already present in the map.
SetBasemapLayer(ILayer?)
Replaces the current basemap layer, or removes it when
layer is null.
public void SetBasemapLayer(ILayer? layer)
Parameters
layerILayerThe new basemap layer, or null.
Exceptions
- ArgumentException
layerbelongs to another managed band or is already present in the map.