Class RenderService
Inheritance
RenderService
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
|
Edit this page
View Source
CurrentIteration
Declaration
public long CurrentIteration { get; set; }
Property Value
|
Edit this page
View Source
DrawableImageCache
Declaration
public DrawableImageCache DrawableImageCache { get; }
Property Value
|
Edit this page
View Source
FontSourceCache
Declaration
public FontSourceCache FontSourceCache { get; }
Property Value
|
Edit this page
View Source
ImageSourceCache
Declaration
public ImageSourceCache ImageSourceCache { get; }
Property Value
|
Edit this page
View Source
TileCache
Global tile cache. Kept for backward compatibility.
Declaration
public TileCache TileCache { get; }
Property Value
|
Edit this page
View Source
VectorCache
Declaration
public VectorCache VectorCache { get; }
Property Value
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
|
Edit this page
View Source
GetLayerDrawableCache(int)
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
GetPersistentRenderSurface(Func<object?, object>)
Returns the current persistent render surface, first passing it through ensure.
The delegate receives the current value (possibly null or stale), disposes it if needed,
and returns the valid surface. Ownership stays with this RenderService.
Declaration
public object GetPersistentRenderSurface(Func<object?, object> ensure)
Parameters
Returns
|
Edit this page
View Source
IncrementIteration()
Atomically increments CurrentIteration and returns the new value.
Declaration
public long IncrementIteration()
Returns
Implements
Extension Methods