Interface ILayer
Interface for map layers
Inherited Members
Namespace: Mapsui.Layers
Assembly: Mapsui.dll
Syntax
public interface ILayer : IAnimatable, INotifyPropertyChanged, IDisposable
Properties
| Edit this page View SourceAttribution
Attribution for layer
Declaration
HyperlinkWidget Attribution { get; }
Property Value
| Type | Description |
|---|---|
| HyperlinkWidget |
Busy
Flag, if layer is busy
Declaration
bool Busy { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
CustomLayerRendererName
Name of the custom layer renderer. Set this value if you want to use a custom renderer for this layer.
Declaration
string? CustomLayerRendererName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Enabled
Specifies whether this layer should be rendered or not
Declaration
bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Extent
Gets the MRect of the entire layer. Can be null if there are no features in the layer.
Declaration
MRect? Extent { get; }
Property Value
| Type | Description |
|---|---|
| MRect |
Id
Numerical Id of layer
Declaration
int Id { get; }
Property Value
| Type | Description |
|---|---|
| int |
MaxVisible
Minimum visible zoom level
Declaration
double MaxVisible { get; }
Property Value
| Type | Description |
|---|---|
| double |
MinVisible
Minimum visible zoom level
Declaration
double MinVisible { get; }
Property Value
| Type | Description |
|---|---|
| double |
Name
Name of layer
Declaration
string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Opacity
Opacity of layer
Declaration
double Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Resolutions
List of native resolutions
Declaration
IReadOnlyList<double> Resolutions { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<double> |
SortFeatures
Function to sort order of features for drawing
Declaration
Func<IEnumerable<IFeature>, IEnumerable<IFeature>> SortFeatures { get; }
Property Value
| Type | Description |
|---|---|
| Func<IEnumerable<IFeature>, IEnumerable<IFeature>> |
Style
Gets or sets rendering style of layer
Declaration
IStyle? Style { get; set; }
Property Value
| Type | Description |
|---|---|
| IStyle |
Tag
Gets or sets an arbitrary object value that can be used to store custom information about this element
Declaration
object? Tag { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Methods
| Edit this page View SourceDataHasChanged()
To indicate the data withing the layer has changed. This triggers a DataChanged event. This is necessary for situations where the layer can not know about changes to it's data as in the case of editing of a geometry.
Declaration
void DataHasChanged()
GetFeatures(MRect, double)
Get all features in a given MRect for a given resolution
Declaration
IEnumerable<IFeature> GetFeatures(MRect extent, double resolution)
Parameters
| Type | Name | Description |
|---|---|---|
| MRect | extent | Bounding box |
| double | resolution | Resolution of viewport |
Returns
| Type | Description |
|---|---|
| IEnumerable<IFeature> |
Events
| Edit this page View SourceDataChanged
Event called when the data within the layer has changed allowing listeners to react to this.
Declaration
event DataChangedEventHandler DataChanged
Event Type
| Type | Description |
|---|---|
| DataChangedEventHandler |