TileDownloader
Superclasses: DataSource
, Object
A DataSource
that asynchronously downloads tiles from an online
service using a given template.
It contains an internal FileCache
to cache the tiles on the system.
Constructors
- class TileDownloader
- classmethod new(url_template: str) TileDownloader
Creates a new
TileDownloader
that fetches tiles from an API and caches them on disk.See
url_template
for the format of the URL template.- Parameters:
url_template – a URL template to fetch tiles from
Properties
- class TileDownloader
- props.url_template: str
A template for construting the URL to download a tile from.
The template has the following replacements:
“{x}”: The X coordinate of the tile
“{y}”: The Y coordinate of the tile
“{z}”: The zoom level of the tile
“{tmsy}”: The inverted Y coordinate (i.e. tile numbering starts with 0 at
the bottom, rather than top, of the map)