Class TilePipelineHost
- Namespace
- LansMap.Map.TilePipeline
public sealed class TilePipelineHost
- Inheritance
-
objectTilePipelineHost
Constructors
TilePipelineHost(ITilePipelineTarget, Object, Func<int, string, ITileFetcher>)
public TilePipelineHost(ITilePipelineTarget map, Object owner, Func<int, string, ITileFetcher> tileFetcherFactory = null)
Parameters
mapITilePipelineTargetownerObjecttileFetcherFactoryFunc<int, string, ITileFetcher>
Fields
ElevationZoom
public const int ElevationZoom = 10
Field Value
GrowthHysteresisSeconds
public const double GrowthHysteresisSeconds = 0.5
Field Value
MaxElevationWindowTiles
public const int MaxElevationWindowTiles = 128
Field Value
Properties
AttributionSuffix
public string AttributionSuffix { get; }
Property Value
AttributionUrl
public string AttributionUrl { get; }
Property Value
BaseAttribution
public string BaseAttribution { get; }
Property Value
BaseResourceShapeForTests
public TileResourceShape BaseResourceShapeForTests { get; }
Property Value
Batch
public TileBatchRenderer Batch { get; }
Property Value
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
ElevationTileSet
public IElevationTileSet ElevationTileSet { get; }
Property Value
OverlayBatch
public TileBatchRenderer OverlayBatch { get; }
Property Value
OverlayGpu
public TileInstanceGpu[] OverlayGpu { get; }
Property Value
OverlayStreamer
public TileStreamer OverlayStreamer { get; }
Property Value
OverlayTileSizePx
public int OverlayTileSizePx { get; }
Property Value
OverlayTileTexturePx
public int OverlayTileTexturePx { get; }
Property Value
ResolvedUserAgent
public string ResolvedUserAgent { get; }
Property Value
Streamer
public TileStreamer Streamer { get; }
Property Value
TileSizePx
public int TileSizePx { get; }
Property Value
TileTexturePx
public int TileTexturePx { get; }
Property Value
Methods
AddAttributionSuffix(string)
public TileAttributionSuffix.Token AddAttributionSuffix(string text)
Parameters
textstring
Returns
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
configTilePipelineConfigInspector-authored settings; the provider fields are unread on this path.
dependenciesTilePipelineDependenciesSource, address builder and any stage factories. Source and Addresses are required.
elevationCoverageTilesIEnumerable<TileCoord>Same contract as the preset overload's own parameter.
Build(TilePipelineConfig, IEnumerable<TileCoord>)
public void Build(TilePipelineConfig config, IEnumerable<TileCoord> elevationCoverageTiles = null)
Parameters
configTilePipelineConfigelevationCoverageTilesIEnumerable<TileCoord>
BuildFromLocalSource(LocalTileSource, TilePipelineConfig)
Builds the tile pipeline from a local on-disk dataset.
public void BuildFromLocalSource(LocalTileSource source, TilePipelineConfig config)
Parameters
sourceLocalTileSourceThe local dataset: sizes, attribution and cache identity.
configTilePipelineConfigInspector-authored settings; the provider fields are unread.
CoverageTilesAroundCenter(double, double)
public static IEnumerable<TileCoord> CoverageTilesAroundCenter(double lat, double lon)
Parameters
Returns
DisableOverlay()
public void DisableOverlay()
DisposeOverlay()
public void DisposeOverlay()
EnsureElevationFetch(IEnumerable<TileCoord>)
public void EnsureElevationFetch(IEnumerable<TileCoord> coverageTiles)
Parameters
coverageTilesIEnumerable<TileCoord>
GrowIfUndersized(bool, double)
public void GrowIfUndersized(bool automaticCapacity, double now)
Parameters
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
newCoverageTilesIEnumerable<TileCoord>
Returns
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
configTilePipelineConfigThe same pipeline configuration Build(TilePipelineConfig, IEnumerable<TileCoord>) was given.
elevationCoverageTilesIEnumerable<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
tokenTileAttributionSuffix.Token
ResolveElevationWindow(MercatorBounds, int, List<TileCoord>)
public static int ResolveElevationWindow(MercatorBounds bounds, int maxTiles, List<TileCoord> result)
Parameters
boundsMercatorBoundsmaxTilesintresultList<TileCoord>
Returns
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
configTilePipelineConfigInspector-authored settings for the rebuild.
dependenciesTilePipelineDependenciesConsumer-supplied stages, or null for the preset path.
elevationCoverageTilesIEnumerable<TileCoord>Same contract as Build(TilePipelineConfig, IEnumerable<TileCoord>).
SetProvider(TilePipelineConfig, IEnumerable<TileCoord>)
public void SetProvider(TilePipelineConfig config, IEnumerable<TileCoord> elevationCoverageTiles = null)
Parameters
configTilePipelineConfigelevationCoverageTilesIEnumerable<TileCoord>
StartOverlay(TilePipelineConfig)
public void StartOverlay(TilePipelineConfig config)
Parameters
configTilePipelineConfig
Teardown(bool)
public void Teardown(bool disposeElevationTileSet = true)
Parameters
disposeElevationTileSetbool