Class BaseLayer
Inheritance
Inherited Members
Namespace: Mapsui.Layers
Assembly: Mapsui.dll
Syntax
public abstract class BaseLayer : ILayer, INotifyPropertyChanged
Constructors
| Improve this Doc View SourceBaseLayer()
Creates a BaseLayer without a name
Declaration
protected BaseLayer()
BaseLayer(String)
Creates a BaseLayer with a name
Declaration
protected BaseLayer(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name for this layer |
Properties
| Improve this Doc View SourceAttribution
Attribution for layer
Declaration
public Hyperlink Attribution { get; set; }
Property Value
Type | Description |
---|---|
Hyperlink |
Busy
Flag, if layer is busy
Declaration
public bool Busy { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CRS
The spatial reference CRS. This always needs to be equal to the CRS or the map. It should eventually be removed altogether
Declaration
public string CRS { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Enabled
Specifies whether this layer should be rendered or not
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Envelope
Returns the envelope of all avaiable data in the layer
Declaration
public virtual BoundingBox Envelope { get; protected set; }
Property Value
Type | Description |
---|---|
BoundingBox |
Exclusive
Of all layers with Exclusive is true only one will be Enabled at a time. This can be used for radiobuttons.
Declaration
public bool Exclusive { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Id
Numerical Id of layer
Declaration
public int Id { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsMapInfoLayer
Indicates if the layer should be taken into account for the GetMapInfo request
Declaration
public bool IsMapInfoLayer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxVisible
Minimum visible zoom level
Declaration
public double MaxVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
MinVisible
Minimum visible zoom level
Declaration
public double MinVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Name
Name of layer
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Opacity
Opacity of layer
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Resolutions
List of native resolutions
Declaration
public virtual IReadOnlyList<double> Resolutions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Double> |
Style
Gets or sets rendering style of layer
Declaration
public 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
public object Tag { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Transformation
The coordinate transformation
Declaration
public ITransformation Transformation { get; set; }
Property Value
Type | Description |
---|---|
ITransformation |
Transformer
Declaration
public Transformer Transformer { get; }
Property Value
Type | Description |
---|---|
Transformer |
Methods
| Improve this Doc View SourceDataHasChanged()
Declaration
public void DataHasChanged()
GetFeaturesInView(BoundingBox, Double)
Get all features in a given BoundingBox for a given resolution
Declaration
public abstract IEnumerable<IFeature> GetFeaturesInView(BoundingBox box, double resolution)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | |
System.Double | resolution | Resolution of viewport |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IFeature> |
GetLayerStyles(ILayer)
Get a layer's styles
Declaration
public static IEnumerable<IStyle> GetLayerStyles(ILayer layer)
Parameters
Type | Name | Description |
---|---|---|
ILayer | layer | Layer, for which styles should be returned |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IStyle> | Enumerable with styles belonging to layer |
IsCrsSupported(String)
Queries whether a layer supports projection to a certain CRS.
Declaration
public virtual bool? IsCrsSupported(string crs)
Parameters
Type | Name | Description |
---|---|---|
System.String | crs | The crs to project to |
Returns
Type | Description |
---|---|
System.Nullable<System.Boolean> | True if is does, false if it does not, null if it is unknown |
OnDataChanged(DataChangedEventArgs)
Declaration
protected void OnDataChanged(DataChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataChangedEventArgs | args |
OnPropertyChanged(String)
Declaration
protected virtual void OnPropertyChanged(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
RefreshData(BoundingBox, Double, Boolean)
Indicates that there has been a change in the view of the map
Declaration
public abstract void RefreshData(BoundingBox extent, double resolution, bool majorChange)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | extent | The new extent of the visible map |
System.Double | resolution | The new resolution of the visible map |
System.Boolean | majorChange | If true an implementation should always refresh it's data. If false (minorChange) the implementation could ignore it. Example: During dragging a map a WMS layer would not want to fetch data, only on the drag end. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Events
| Improve this Doc View SourceDataChanged
DataChanged should be triggered by any data changes
Declaration
public event DataChangedEventHandler DataChanged
Event Type
Type | Description |
---|---|
DataChangedEventHandler |
PropertyChanged
Called whenever a property changed
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |