Skip to content

IRawVectorTileSource

Namespace: ThinkGeo.Core

Optional companion to IVectorTileSource: hands a renderer the raw vector-tile bytes so it can decode them itself, instead of materializing the per-feature object graph that IVectorTileSource.GetFeaturesFromTileAsync(int, long, long, CancellationToken) builds. A GPU renderer parsing straight from the bytes allocates orders of magnitude less than the Feature path; sources that cannot supply bytes (for example, sources that cut tiles from live feature data) simply do not implement this interface and the renderer falls back to the Feature path.

public interface IRawVectorTileSource : IVectorTileSource

Implements IVectorTileSource

Remarks:

The payload is Core's Tile: the bytes it already carries, at the coordinates they were fetched from, which is what the renderer needs and what the tile pipeline already speaks. A tile asked for below an archive's deepest zoom comes back as the tile above it, with its own zoom and column and row, for the caller to overzoom or decline.

A renderer optimization seam rather than something an application calls: a source opts into it, and a renderer falls back to the Feature path for one that does not. Every source that opts in is a vector tile source as well, so the interface says so. It is public because the Blazor and Web API overlays read it - they serve archive bytes to the browser as they are - and those assemblies see only Core's public surface.

Methods

GetRawTilesFromExactTileAsync(int, long, long, CancellationToken)

The tiles at a place, by source id: one entry, holding the tile's bytes.

Task<Dictionary<string, Tile>> GetRawTilesFromExactTileAsync(int zoom, long x, long y, CancellationToken cancellationToken)

Parameters

zoom int
The requested tile zoom level.

x long
The requested tile column.

y long
The requested tile row.

cancellationToken CancellationToken
The token that can be used to cancel the operation.

Returns

Task<Dictionary<string, Tile>>
A task that represents the asynchronous operation and provides the result.