Class Layer
Inherited Members
Namespace: Mapsui.Layers
Assembly: Mapsui.dll
Syntax
public class Layer : BaseLayer, ILayer, INotifyPropertyChanged, IAsyncDataFetcher
Constructors
| Improve this Doc View SourceLayer()
Create a new layer
Declaration
public Layer()
Layer(String)
Create layer with name
Declaration
public Layer(string layername)
Parameters
Type | Name | Description |
---|---|---|
System.String | layername | Name to use for layer |
Properties
| Improve this Doc View SourceDataSource
Data source for this layer
Declaration
public IProvider DataSource { get; set; }
Property Value
Type | Description |
---|---|
IProvider |
Envelope
Returns the extent of the layer
Declaration
public override BoundingBox Envelope { get; }
Property Value
Type | Description |
---|---|
BoundingBox | Bounding box corresponding to the extent of the features in the layer |
Overrides
| Improve this Doc View SourceFetchingPostponedInMilliseconds
Time to wait before fetching data
Declaration
public int FetchingPostponedInMilliseconds { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceAbortFetch()
Aborts the tile fetches that are in progress. If this method is not called the threads will terminate naturally. It will just take a little longer.
Declaration
public void AbortFetch()
ClearCache()
Clear cache of layer
Declaration
public void ClearCache()
GetFeaturesInView(BoundingBox, Double)
Get all features in a given BoundingBox for a given resolution
Declaration
public override IEnumerable<IFeature> GetFeaturesInView(BoundingBox extent, double resolution)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | extent | |
System.Double | resolution | Resolution of viewport |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IFeature> |
Overrides
| Improve this Doc View SourceIsCrsSupported(String)
Queries whether a layer supports projection to a certain CRS.
Declaration
public override 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 |
Overrides
| Improve this Doc View SourceRefreshData(BoundingBox, Double, Boolean)
Indicates that there has been a change in the view of the map
Declaration
public override 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. |