Interface ILayer
Interface for map layers
Inherited Members
Namespace: Mapsui.Layers
Assembly: Mapsui.dll
Syntax
public interface ILayer : INotifyPropertyChanged
Properties
| Improve this Doc View SourceAttribution
Attribution for layer
Declaration
Hyperlink Attribution { get; }
Property Value
Type | Description |
---|---|
Hyperlink |
Busy
Flag, if layer is busy
Declaration
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
string CRS { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Enabled
Specifies whether this layer should be rendered or not
Declaration
bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Envelope
Gets the boundingbox of the entire layer
Declaration
BoundingBox Envelope { get; }
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
bool Exclusive { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Id
Numerical Id of layer
Declaration
int Id { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsMapInfoLayer
Indicates if the layer should be taken into account for the GetMapInfo request
Declaration
bool IsMapInfoLayer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxVisible
Minimum visible zoom level
Declaration
double MaxVisible { get; }
Property Value
Type | Description |
---|---|
System.Double |
MinVisible
Minimum visible zoom level
Declaration
double MinVisible { get; }
Property Value
Type | Description |
---|---|
System.Double |
Name
Name of layer
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Opacity
Opacity of layer
Declaration
double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Resolutions
List of native resolutions
Declaration
IReadOnlyList<double> Resolutions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Double> |
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 |
---|---|
System.Object |
Transformation
The coordinate transformation
Declaration
ITransformation Transformation { get; set; }
Property Value
Type | Description |
---|---|
ITransformation |
Methods
| Improve this Doc 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()
GetFeaturesInView(BoundingBox, Double)
Get all features in a given BoundingBox for a given resolution
Declaration
IEnumerable<IFeature> GetFeaturesInView(BoundingBox extent, double resolution)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | extent | Bounding box |
System.Double | resolution | Resolution of viewport |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IFeature> |
IsCrsSupported(String)
Queries whether a layer supports projection to a certain CRS.
Declaration
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 |
RefreshData(BoundingBox, Double, Boolean)
Indicates that there has been a change in the view of the map
Declaration
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. |
Events
| Improve this Doc 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 |