Shumate.TileDownloader¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
URL template |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Shumate.TileDownloader(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [class`DataSource`] that asynchronously downloads tiles from an online service using a given template.
It contains an internal [class`FileCache`] to cache the tiles on the system.
- classmethod new(url_template)¶
- Parameters:
url_template (
str
) – a URL template to fetch tiles from- Returns:
a newly constructed [class`TileDownloader`]
- Return type:
Creates a new [class`TileDownloader`] that fetches tiles from an API and caches them on disk.
See [property`TileDownloader`:py:data::url-template<Shumate.TileDownloader.props.url_template>] for the format of the URL template.
Property Details¶
- Shumate.TileDownloader.props.url_template¶
- Name:
url-template
- Type:
- Default Value:
- Flags:
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)