Show / Hide Table of Contents

    Class TileLayer

    Layer, which displays a map consisting of individual tiles

    Inheritance
    System.Object
    BaseLayer
    TileLayer
    Implements
    ILayer
    System.ComponentModel.INotifyPropertyChanged
    IAsyncDataFetcher
    Inherited Members
    BaseLayer.Transformer
    BaseLayer.GetLayerStyles(ILayer)
    BaseLayer.PropertyChanged
    BaseLayer.DataChanged
    BaseLayer.Id
    BaseLayer.Tag
    BaseLayer.MinVisible
    BaseLayer.MaxVisible
    BaseLayer.Enabled
    BaseLayer.Name
    BaseLayer.CRS
    BaseLayer.Exclusive
    BaseLayer.Opacity
    BaseLayer.Busy
    BaseLayer.Style
    BaseLayer.Transformation
    BaseLayer.Attribution
    BaseLayer.IsMapInfoLayer
    BaseLayer.DataHasChanged()
    BaseLayer.ToString()
    BaseLayer.OnPropertyChanged(String)
    BaseLayer.OnDataChanged(DataChangedEventArgs)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Mapsui.Layers
    Assembly: Mapsui.dll
    Syntax
    public class TileLayer : BaseLayer, ILayer, INotifyPropertyChanged, IAsyncDataFetcher

    Constructors

    | Improve this Doc View Source

    TileLayer(ITileSource, Int32, Int32, Int32, IFetchStrategy, IRenderGetStrategy, Int32, Int32, Func<TileInfo, Object, Feature>, Func<TileInfo, Object>)

    Create tile layer for given tile source

    Declaration
    public TileLayer(ITileSource source = null, int minTiles = 200, int maxTiles = 300, int maxRetries = 2, IFetchStrategy fetchStrategy = null, IRenderGetStrategy renderGetStrategy = null, int minExtraTiles = -1, int maxExtraTiles = -1, Func<TileInfo, object, Feature> fetchToFeature = null, Func<TileInfo, object> fetchGetTile = null)
    Parameters
    Type Name Description
    BruTile.ITileSource source

    Tile source to use for this layer

    System.Int32 minTiles

    Minimum number of tiles to cache

    System.Int32 maxTiles

    Maximum number of tiles to cache

    System.Int32 maxRetries

    Unused

    IFetchStrategy fetchStrategy

    Strategy to get list of tiles for given extent

    IRenderGetStrategy renderGetStrategy
    System.Int32 minExtraTiles

    Number of minimum extra tiles for memory cache

    System.Int32 maxExtraTiles

    Number of maximum extra tiles for memory cache

    System.Func<BruTile.TileInfo, System.Object, Feature> fetchToFeature
    System.Func<BruTile.TileInfo, System.Object> fetchGetTile
    | Improve this Doc View Source

    TileLayer(Func<ITileSource>)

    Create tile layer from tile source initializer function

    Declaration
    public TileLayer(Func<ITileSource> tileSourceInitializer)
    Parameters
    Type Name Description
    System.Func<BruTile.ITileSource> tileSourceInitializer

    Initializer to create a tile layer source

    Properties

    | Improve this Doc View Source

    Envelope

    Returns the envelope of all avaiable data in the layer

    Declaration
    public override BoundingBox Envelope { get; }
    Property Value
    Type Description
    BoundingBox
    Overrides
    BaseLayer.Envelope
    | Improve this Doc View Source

    Resolutions

    List of native resolutions

    Declaration
    public override IReadOnlyList<double> Resolutions { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<System.Double>
    Overrides
    BaseLayer.Resolutions
    | Improve this Doc View Source

    TileSource

    Tile source for this layer

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

    Methods

    | Improve this Doc View Source

    AbortFetch()

    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()
    | Improve this Doc View Source

    ClearCache()

    Clear cache of layer

    Declaration
    public void ClearCache()
    | Improve this Doc View Source

    GetFeaturesInView(BoundingBox, Double)

    Get all features in a given BoundingBox for a given resolution

    Declaration
    public override 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>
    Overrides
    BaseLayer.GetFeaturesInView(BoundingBox, Double)
    | Improve this Doc View Source

    IsCrsSupported(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
    BaseLayer.IsCrsSupported(String)
    | Improve this Doc View Source

    RefreshData(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.

    Overrides
    BaseLayer.RefreshData(BoundingBox, Double, Boolean)

    Implements

    ILayer
    System.ComponentModel.INotifyPropertyChanged
    IAsyncDataFetcher
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX