Table of Contents

Class TilePipelineHost

public sealed class TilePipelineHost
Inheritance
object
TilePipelineHost

Constructors

TilePipelineHost(ITilePipelineTarget, Object, Func<int, string, ITileFetcher>)

public TilePipelineHost(ITilePipelineTarget map, Object owner, Func<int, string, ITileFetcher> tileFetcherFactory = null)

Parameters

map ITilePipelineTarget
owner Object
tileFetcherFactory Func<int, string, ITileFetcher>

Fields

ElevationZoom

public const int ElevationZoom = 10

Field Value

int

GrowthHysteresisSeconds

public const double GrowthHysteresisSeconds = 0.5

Field Value

double

MaxElevationWindowTiles

public const int MaxElevationWindowTiles = 128

Field Value

int

Properties

AttributionSuffix

public string AttributionSuffix { get; }

Property Value

string

AttributionUrl

public string AttributionUrl { get; }

Property Value

string

BaseAttribution

public string BaseAttribution { get; }

Property Value

string

BaseResourceShapeForTests

public TileResourceShape BaseResourceShapeForTests { get; }

Property Value

TileResourceShape

Batch

public TileBatchRenderer Batch { get; }

Property Value

TileBatchRenderer

ElevationSourceResolver

Supplies the elevation source each build fetches terrain through. Null, or returning null, uses the built-in Terrarium source.

public Func<IElevationSource> ElevationSourceResolver { get; set; }

Property Value

Func<IElevationSource>

ElevationTileSet

public IElevationTileSet ElevationTileSet { get; }

Property Value

IElevationTileSet

OverlayBatch

public TileBatchRenderer OverlayBatch { get; }

Property Value

TileBatchRenderer

OverlayGpu

public TileInstanceGpu[] OverlayGpu { get; }

Property Value

TileInstanceGpu[]

OverlayStreamer

public TileStreamer OverlayStreamer { get; }

Property Value

TileStreamer

OverlayTileSizePx

public int OverlayTileSizePx { get; }

Property Value

int

OverlayTileTexturePx

public int OverlayTileTexturePx { get; }

Property Value

int

ResolvedUserAgent

public string ResolvedUserAgent { get; }

Property Value

string

Streamer

public TileStreamer Streamer { get; }

Property Value

TileStreamer

TileSizePx

public int TileSizePx { get; }

Property Value

int

TileTexturePx

public int TileTexturePx { get; }

Property Value

int

Methods

AddAttributionSuffix(string)

public TileAttributionSuffix.Token AddAttributionSuffix(string text)

Parameters

text string

Returns

TileAttributionSuffix.Token

Build(TilePipelineConfig, TilePipelineDependencies, IEnumerable<TileCoord>)

Builds the tile pipeline on consumer-supplied dependencies instead of a provider preset.

public void Build(TilePipelineConfig config, TilePipelineDependencies dependencies, IEnumerable<TileCoord> elevationCoverageTiles = null)

Parameters

config TilePipelineConfig

Inspector-authored settings; the provider fields are unread on this path.

dependencies TilePipelineDependencies

Source, address builder and any stage factories. Source and Addresses are required.

elevationCoverageTiles IEnumerable<TileCoord>

Same contract as the preset overload's own parameter.

Build(TilePipelineConfig, IEnumerable<TileCoord>)

public void Build(TilePipelineConfig config, IEnumerable<TileCoord> elevationCoverageTiles = null)

Parameters

config TilePipelineConfig
elevationCoverageTiles IEnumerable<TileCoord>

BuildFromLocalSource(LocalTileSource, TilePipelineConfig)

Builds the tile pipeline from a local on-disk dataset.

public void BuildFromLocalSource(LocalTileSource source, TilePipelineConfig config)

Parameters

source LocalTileSource

The local dataset: sizes, attribution and cache identity.

config TilePipelineConfig

Inspector-authored settings; the provider fields are unread.

CoverageTilesAroundCenter(double, double)

public static IEnumerable<TileCoord> CoverageTilesAroundCenter(double lat, double lon)

Parameters

lat double
lon double

Returns

IEnumerable<TileCoord>

DisableOverlay()

public void DisableOverlay()

DisposeOverlay()

public void DisposeOverlay()

EnsureElevationFetch(IEnumerable<TileCoord>)

public void EnsureElevationFetch(IEnumerable<TileCoord> coverageTiles)

Parameters

coverageTiles IEnumerable<TileCoord>

GrowIfUndersized(bool, double)

public void GrowIfUndersized(bool automaticCapacity, double now)

Parameters

automaticCapacity bool
now double

HaltIfWebGpuDeviceLost()

Stops tile work for the rest of the session if the WebGPU device has been lost.

public bool HaltIfWebGpuDeviceLost()

Returns

bool

True once the device is lost, every call after that too. The caller should skip its ticks and draws for this frame.

Remarks

Call it where GrowIfUndersized(bool, double) is called: between ticks, never inside one. Always false off Web.

NotifyOwnerDeactivated()

public void NotifyOwnerDeactivated()

ReFetchElevationIfDrifted(IEnumerable<TileCoord>)

public ElevationRefetchOutcome ReFetchElevationIfDrifted(IEnumerable<TileCoord> newCoverageTiles)

Parameters

newCoverageTiles IEnumerable<TileCoord>

Returns

ElevationRefetchOutcome

RebuildIfWebBlockEncoderFailed(TilePipelineConfig, IEnumerable<TileCoord>)

Rebuilds the tile pipeline with uncompressed tiles if the browser-side tile encoder failed to load.

public bool RebuildIfWebBlockEncoderFailed(TilePipelineConfig config, IEnumerable<TileCoord> elevationCoverageTiles = null)

Parameters

config TilePipelineConfig

The same pipeline configuration Build(TilePipelineConfig, IEnumerable<TileCoord>) was given.

elevationCoverageTiles IEnumerable<TileCoord>

Elevation coverage for the rebuilt pipeline, same contract as Build(TilePipelineConfig, IEnumerable<TileCoord>).

Returns

bool

True when a rebuild happened this call.

Remarks

Only ever does anything on Web builds using block-compressed tile residency. Call it between ticks, never inside one.

RemoveAttributionSuffix(Token)

public void RemoveAttributionSuffix(TileAttributionSuffix.Token token)

Parameters

token TileAttributionSuffix.Token

ResolveElevationWindow(MercatorBounds, int, List<TileCoord>)

public static int ResolveElevationWindow(MercatorBounds bounds, int maxTiles, List<TileCoord> result)

Parameters

bounds MercatorBounds
maxTiles int
result List<TileCoord>

Returns

int

SetProvider(TilePipelineConfig, TilePipelineDependencies, IEnumerable<TileCoord>)

Tears the tile pipeline down and rebuilds it on dependencies. Null rebuilds from the config's own provider, which is what the overload above does.

public void SetProvider(TilePipelineConfig config, TilePipelineDependencies dependencies, IEnumerable<TileCoord> elevationCoverageTiles = null)

Parameters

config TilePipelineConfig

Inspector-authored settings for the rebuild.

dependencies TilePipelineDependencies

Consumer-supplied stages, or null for the preset path.

elevationCoverageTiles IEnumerable<TileCoord>

Same contract as Build(TilePipelineConfig, IEnumerable<TileCoord>).

SetProvider(TilePipelineConfig, IEnumerable<TileCoord>)

public void SetProvider(TilePipelineConfig config, IEnumerable<TileCoord> elevationCoverageTiles = null)

Parameters

config TilePipelineConfig
elevationCoverageTiles IEnumerable<TileCoord>

StartOverlay(TilePipelineConfig)

public void StartOverlay(TilePipelineConfig config)

Parameters

config TilePipelineConfig

Teardown(bool)

public void Teardown(bool disposeElevationTileSet = true)

Parameters

disposeElevationTileSet bool