Search Results for

    Show / Hide Table of Contents

    Class RenderService

    Inheritance
    object
    RenderService
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mapsui.Rendering
    Assembly: Mapsui.dll
    Syntax
    public sealed class RenderService : IDisposable

    Constructors

    | Edit this page View Source

    RenderService(int)

    Declaration
    public RenderService(int vectorCacheCapacity = 30000)
    Parameters
    Type Name Description
    int vectorCacheCapacity

    Properties

    | Edit this page View Source

    CreateDrawable

    Factory delegate for creating drawables from features and styles. Set by the MapRenderer during initialization when the Map is assigned to a MapControl. This enables the fetch pipeline to create drawables directly without needing access to renderer internals.

    Declaration
    public Func<Viewport, ILayer, IFeature, IStyle, RenderService, IDrawable?>? CreateDrawable { get; set; }
    Property Value
    Type Description
    Func<Viewport, ILayer, IFeature, IStyle, RenderService, IDrawable>
    | Edit this page View Source

    CurrentIteration

    Declaration
    public long CurrentIteration { get; set; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    DrawableImageCache

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

    ImageSourceCache

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

    TileCache

    Global tile cache. Kept for backward compatibility.

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

    VectorCache

    Declaration
    public VectorCache VectorCache { get; }
    Property Value
    Type Description
    VectorCache

    Methods

    | Edit this page View Source

    CleanupLayerCaches(int)

    Cleans up all caches associated with a layer. Call this when a layer is removed from the map.

    Declaration
    public void CleanupLayerCaches(int layerId)
    Parameters
    Type Name Description
    int layerId

    The unique identifier of the layer.

    | Edit this page View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

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

    GetLayerDrawableCache(int)

    Returns the drawable cache for the specified layer, or null if it has not been created yet. The cache is always created through GetOrCreateLayerDrawableCache(int, Func<IDrawableCache>) so that the correct type is chosen by the renderer (e.g. TileDrawableCache vs DrawableCache). A silent DrawableCache fallback here would create the wrong type and cause tile-layer entries to be evicted unexpectedly.

    Declaration
    public IDrawableCache? GetLayerDrawableCache(int layerId)
    Parameters
    Type Name Description
    int layerId

    The unique identifier of the layer.

    Returns
    Type Description
    IDrawableCache

    The cache, or null when the layer has not yet been through UpdateDrawables.

    | Edit this page View Source

    GetOrCreateLayerDrawableCache(int, Func<IDrawableCache>)

    Gets or creates a drawable cache for the specified layer using a custom factory. This allows renderers to specify their own cache type (e.g. TileDrawableCache). If a cache already exists for this layer, it is returned regardless of the factory.

    Declaration
    public IDrawableCache GetOrCreateLayerDrawableCache(int layerId, Func<IDrawableCache> cacheFactory)
    Parameters
    Type Name Description
    int layerId

    The unique identifier of the layer.

    Func<IDrawableCache> cacheFactory

    Factory to create the cache if it doesn't exist yet.

    Returns
    Type Description
    IDrawableCache

    An IDrawableCache dedicated to the specified layer.

    | Edit this page View Source

    IncrementIteration()

    Atomically increments CurrentIteration and returns the new value.

    Declaration
    public long IncrementIteration()
    Returns
    Type Description
    long

    Implements

    IDisposable

    Extension Methods

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