Class RasterizingLayer
Inherited Members
Namespace: Mapsui.Layers
Assembly: Mapsui.dll
Syntax
public class RasterizingLayer : BaseLayer, ILayer, IAnimatable, INotifyPropertyChanged, IDisposable, IFetchableSource, ISourceLayer
Constructors
| Edit this page View SourceRasterizingLayer(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 SourceExtent
Returns the envelope of all available data in the layer
Declaration
public override MRect? Extent { get; }
Property Value
| Type | Description |
|---|---|
| MRect |
Overrides
| Edit this page View SourceSourceLayer
Declaration
public ILayer SourceLayer { get; }
Property Value
| Type | Description |
|---|---|
| ILayer |
SymbolSize
Declaration
public static double SymbolSize { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
| Edit this page View SourceClearCache()
Clears the cache of this layer. Call this if source data has was invalidated or the layer is removed.
Declaration
public void ClearCache()
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
| Edit this page View SourceGetFetchJobs(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[] |
OnFetchRequested()
Declaration
protected virtual void OnFetchRequested()
ToViewport(MSection)
Declaration
public static Viewport ToViewport(MSection section)
Parameters
| Type | Name | Description |
|---|---|---|
| MSection | section |
Returns
| Type | Description |
|---|---|
| Viewport |
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 SourceFetchRequested
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> |