Search Results for

    Show / Hide Table of Contents

    Class RasterizingLayer

    Inheritance
    object
    BaseLayer
    RasterizingLayer
    Implements
    ILayer
    IAnimatable
    INotifyPropertyChanged
    IDisposable
    IFetchableSource
    ISourceLayer
    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()
    BaseLayer.UpdateAnimations()
    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 RasterizingLayer : BaseLayer, ILayer, IAnimatable, INotifyPropertyChanged, IDisposable, IFetchableSource, ISourceLayer

    Constructors

    | Edit this page View Source

    RasterizingLayer(ILayer, int, IMapRenderer?, float, RenderFormat)

    Creates a RasterizingLayer which rasterizes a layer for performance

    Declaration
    public RasterizingLayer(ILayer sourceLayer, int delayBeforeRasterize = 1000, IMapRenderer? rasterizer = null, float pixelDensity = 1, RenderFormat renderFormat = RenderFormat.Png)
    Parameters
    Type Name Description
    ILayer sourceLayer

    The Layer to be rasterized

    int delayBeforeRasterize

    Delay after viewport change to start re-rasterizing

    IMapRenderer rasterizer

    Rasterizer to use. null will use the default

    float pixelDensity
    RenderFormat renderFormat

    render Format png is default and skp is skia picture

    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

    SourceLayer

    Declaration
    public ILayer SourceLayer { get; }
    Property Value
    Type Description
    ILayer
    | Edit this page View Source

    SymbolSize

    Declaration
    public static double SymbolSize { get; set; }
    Property Value
    Type Description
    double

    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

    GetFeatures(MRect, double)

    Get all features in a given MRect for a given resolution

    Declaration
    public override IEnumerable<IFeature> GetFeatures(MRect box, double resolution)
    Parameters
    Type Name Description
    MRect 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 activeFetchCount, int availableFetchSlots)
    Parameters
    Type Name Description
    int activeFetchCount

    Number of active fetches for this layer. It is relevant if the layer itself has a maximum on the number of active fetches for itself.

    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

    ToViewport(MSection)

    Declaration
    public static Viewport ToViewport(MSection section)
    Parameters
    Type Name Description
    MSection section
    Returns
    Type Description
    Viewport
    | 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
    ISourceLayer

    Extension Methods

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