Class TileRegion
Enumerates tiles that cover a geographic region, for prefetch or offline download.
public static class TileRegion
- Inheritance
-
objectTileRegion
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
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
boundsGeoBoundsGeographic region, degrees WGS84.
minZoomintInclusive minimum zoom, 0 to Max.
maxZoomintInclusive maximum zoom, 0 to Max.
maxTilesintRefusal cap on total tile count across the zoom range.
resultsList<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
boundsGeoBoundsGeographic region, degrees WGS84.
minZoomintInclusive minimum zoom, 0 to Max.
maxZoomintInclusive maximum zoom, 0 to Max.
maxTilesintRefusal cap on total tile count across the zoom range.
resultsList<TileCoord>Destination list; cleared before fill, and on refusal.
estimatedTotalByteslongFull-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.