Search Results for

    Show / Hide Table of Contents

    Class TileLayer

    Layer, which displays a map consisting of individual tiles

    Inheritance
    object
    BaseLayer
    TileLayer
    RasterizingTileLayer
    Implements
    ILayer
    IAnimatable
    INotifyPropertyChanged
    IFetchableSource
    IDisposable
    Inherited Members
    BaseLayer.NextId()
    BaseLayer.PropertyChanged
    BaseLayer.DataChanged
    BaseLayer.Id
    BaseLayer.Tag
    BaseLayer.MinVisible
    BaseLayer.MaxVisible
    BaseLayer.Enabled
    BaseLayer.Name
    BaseLayer.Opacity
    BaseLayer.Busy
    BaseLayer.Style
    BaseLayer.Attribution
    BaseLayer.SortFeatures
    BaseLayer.CustomLayerRendererName
    BaseLayer.DataHasChanged()
    BaseLayer.ToString()
    BaseLayer.OnPropertyChanged(string)
    BaseLayer.OnDataChanged(DataChangedEventArgs)
    BaseLayer.Dispose()
    BaseLayer.UpdateAnimations()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Mapsui.Tiling.Layers
    Assembly: Mapsui.Tiling.dll
    Syntax
    public class TileLayer : BaseLayer, ILayer, IAnimatable, INotifyPropertyChanged, IFetchableSource, IDisposable

    Constructors

    | Edit this page View Source

    TileLayer(ITileSource, int, int, IDataFetchStrategy?, IRenderFetchStrategy?, int, int, Func<TileInfo, Task<IFeature?>>?, HttpClient?)

    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, HttpClient? httpClient = 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

    HttpClient httpClient

    A custom HttpClient (may include custom header parameters etc)

    Properties

    | Edit this page View Source

    Extent

    Returns the envelope of all available data in the layer

    Declaration
    public override MRect? Extent { get; }
    Property Value
    Type Description
    MRect
    Overrides
    BaseLayer.Extent
    | Edit this page View Source

    Resolutions

    List of native resolutions

    Declaration
    public override IReadOnlyList<double> Resolutions { get; }
    Property Value
    Type Description
    IReadOnlyList<double>
    Overrides
    BaseLayer.Resolutions
    | Edit this page View Source

    TileSource

    TileSource

    Declaration
    public ITileSource TileSource { get; }
    Property Value
    Type Description
    ITileSource

    Methods

    | Edit this page View Source

    ClearCache()

    Clears the cache of this layer. Call this if source data has was invalidated or the layer is removed.

    Declaration
    public void ClearCache()
    | Edit this page View Source

    Dispose(bool)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    BaseLayer.Dispose(bool)
    | Edit this page View Source

    GetFeatures(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
    BaseLayer.GetFeatures(MRect, double)
    | Edit this page View Source

    GetFetchJobs(int, int)

    Gets the fetch requests for this layer. The requests are based on the viewport stored within the layer.

    Declaration
    public FetchJob[] GetFetchJobs(int activeFetches, int availableFetchSlots)
    Parameters
    Type Name Description
    int activeFetches
    int availableFetchSlots

    Number of available fetch slots in the caller. It is the maximum number of fetch jobs the method should return.

    Returns
    Type Description
    FetchJob[]
    | Edit this page View Source

    OnFetchRequested()

    Declaration
    protected virtual void OnFetchRequested()
    | Edit this page View Source

    ViewportChanged(FetchInfo)

    Informs the layer that the viewport has changed and it should update its data accordingly.

    Declaration
    public virtual void ViewportChanged(FetchInfo fetchInfo)
    Parameters
    Type Name Description
    FetchInfo fetchInfo

    Events

    | Edit this page View Source

    FetchRequested

    Indicates to the listener that it should fetch data again. This event is raised when there was a change in source data, so only relevant for dynamic data. The fetches triggered by viewport changes do not depend on it.

    Declaration
    public event EventHandler<FetchRequestedEventArgs>? FetchRequested
    Event Type
    Type Description
    EventHandler<FetchRequestedEventArgs>

    Implements

    ILayer
    IAnimatable
    INotifyPropertyChanged
    IFetchableSource
    IDisposable

    Extension Methods

    LayerExtensions.WaitForLoadingAsync(ILayer)
    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX