Class TileLayer
Layer, which displays a map consisting of individual tiles
Inherited Members
Namespace: Mapsui.Tiling.Layers
Assembly: Mapsui.Tiling.dll
Syntax
public class TileLayer : BaseLayer, ILayer, IAnimatable, INotifyPropertyChanged, IAsyncDataFetcher, IDisposable
Constructors
| Edit this page View SourceTileLayer(ITileSource, int, int, IDataFetchStrategy?, IRenderFetchStrategy?, int, int, Func<TileInfo, Task<IFeature?>>?)
Create tile layer for given tile source
Declaration
public TileLayer(ITileSource tileSource, int minTiles = 200, int maxTiles = 300, IDataFetchStrategy? dataFetchStrategy = null, IRenderFetchStrategy? renderFetchStrategy = null, int minExtraTiles = -1, int maxExtraTiles = -1, Func<TileInfo, Task<IFeature?>>? fetchTileAsFeature = null)
Parameters
Type | Name | Description |
---|---|---|
ITileSource | tileSource | Tile source to use for this layer |
int | minTiles | Minimum number of tiles to cache |
int | maxTiles | Maximum number of tiles to cache |
IDataFetchStrategy | dataFetchStrategy | Strategy to get list of tiles for given extent |
IRenderFetchStrategy | renderFetchStrategy | |
int | minExtraTiles | Number of minimum extra tiles for memory cache |
int | maxExtraTiles | Number of maximum extra tiles for memory cache |
Func<TileInfo, Task<IFeature>> | fetchTileAsFeature | Fetch tile as feature |
Properties
| Edit this page View SourceExtent
Returns the envelope of all available data in the layer
Declaration
public override MRect? Extent { get; }
Property Value
Type | Description |
---|---|
MRect |
Overrides
| Edit this page View SourceResolutions
List of native resolutions
Declaration
public override IReadOnlyList<double> Resolutions { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<double> |
Overrides
| Edit this page View SourceTileSource
TileSource
Declaration
public ITileSource TileSource { get; }
Property Value
Type | Description |
---|---|
ITileSource |
Methods
| Edit this page 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()
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
| Edit this page View SourceGetFeatures(MRect, double)
Get all features in a given MRect for a given resolution
Declaration
public override 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> |
Overrides
| Edit this page View SourceRefreshData(FetchInfo)
Indicates that there has been a change in the view of the map
Declaration
public void RefreshData(FetchInfo fetchInfo)
Parameters
Type | Name | Description |
---|---|---|
FetchInfo | fetchInfo | FetchInfo |