Table of Contents

Class TileRegion

Enumerates tiles that cover a geographic region, for prefetch or offline download.

public static class TileRegion
Inheritance
object
TileRegion

Remarks

Returns false and clears the list when the region exceeds the tile cap. Check the return before starting a download.

Fields

AverageWireBytesPerTile

Nominal on-disk size per tile in bytes, for download-size estimates.

public const int AverageWireBytesPerTile = 22528

Field Value

int

Methods

Enumerate(GeoBounds, int, int, int, List<TileCoord>)

Fills results with tiles covering bounds from minZoom to maxZoom.

public static bool Enumerate(GeoBounds bounds, int minZoom, int maxZoom, int maxTiles, List<TileCoord> results)

Parameters

bounds GeoBounds

Geographic region, degrees WGS84.

minZoom int

Inclusive minimum zoom, 0 to Max.

maxZoom int

Inclusive maximum zoom, 0 to Max.

maxTiles int

Refusal cap on total tile count across the zoom range.

results List<TileCoord>

Destination list; cleared before fill, and on refusal.

Returns

bool

True when the list is filled; false when the region exceeds maxTiles.

Enumerate(GeoBounds, int, int, int, List<TileCoord>, out long)

Fills results with tiles covering bounds, and reports an estimated byte size.

public static bool Enumerate(GeoBounds bounds, int minZoom, int maxZoom, int maxTiles, List<TileCoord> results, out long estimatedTotalBytes)

Parameters

bounds GeoBounds

Geographic region, degrees WGS84.

minZoom int

Inclusive minimum zoom, 0 to Max.

maxZoom int

Inclusive maximum zoom, 0 to Max.

maxTiles int

Refusal cap on total tile count across the zoom range.

results List<TileCoord>

Destination list; cleared before fill, and on refusal.

estimatedTotalBytes long

Full-region estimate in bytes (tile count times AverageWireBytesPerTile), even when the call is refused.

Returns

bool

True when the list is filled; false when the region exceeds maxTiles.