Search Results for

    Show / Hide Table of Contents

    Class Layer

    Create layer with name

    Inheritance
    object
    BaseLayer
    Layer
    Implements
    ILayer
    IAnimatable
    INotifyPropertyChanged
    IDisposable
    IFetchableSource
    ILayerDataSource<IProvider>
    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.Resolutions
    BaseLayer.SortFeatures
    BaseLayer.CustomLayerRendererName
    BaseLayer.DataHasChanged()
    BaseLayer.ToString()
    BaseLayer.OnPropertyChanged(string)
    BaseLayer.OnDataChanged(DataChangedEventArgs)
    BaseLayer.Dispose(bool)
    BaseLayer.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Mapsui.Layers
    Assembly: Mapsui.dll
    Syntax
    public class Layer : BaseLayer, ILayer, IAnimatable, INotifyPropertyChanged, IDisposable, IFetchableSource, ILayerDataSource<IProvider>

    Constructors

    | Edit this page View Source

    Layer()

    Create a new layer

    Declaration
    public Layer()
    | Edit this page View Source

    Layer(string)

    Create layer with name

    Declaration
    public Layer(string layerName)
    Parameters
    Type Name Description
    string layerName

    Name to use for layer

    Properties

    | Edit this page View Source

    Animations

    Declaration
    public List<Func<bool>> Animations { get; }
    Property Value
    Type Description
    List<Func<bool>>
    | Edit this page View Source

    DataSource

    Data source for this layer

    Declaration
    public IProvider? DataSource { get; set; }
    Property Value
    Type Description
    IProvider
    | Edit this page View Source

    Extent

    Returns the extent of the layer

    Declaration
    public override MRect? Extent { get; }
    Property Value
    Type Description
    MRect

    Bounding box corresponding to the extent of the features in the layer

    Overrides
    BaseLayer.Extent

    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

    FetchAsync(FetchInfo, int)

    Declaration
    public Task FetchAsync(FetchInfo fetchInfo, int refreshCounter)
    Parameters
    Type Name Description
    FetchInfo fetchInfo
    int refreshCounter
    Returns
    Type Description
    Task
    | 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

    UpdateAnimations()

    Declaration
    public override bool UpdateAnimations()
    Returns
    Type Description
    bool

    Returns true if animations are running and a graphics update is needed.

    Overrides
    BaseLayer.UpdateAnimations()
    | Edit this page View Source

    ViewportChanged(FetchInfo)

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

    Declaration
    public 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
    IDisposable
    IFetchableSource
    ILayerDataSource<T>

    Extension Methods

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