pyowm.tiles package¶
Submodules¶
pyowm.tiles.enums module¶
pyowm.tiles.tile_manager module¶
- class pyowm.tiles.tile_manager.TileManager(API_key, map_layer, config)[source]¶
Bases:
objectA manager objects that reads OWM map layers tile images .
- Parameters:
API_key (str) – the OWM Weather API key
map_layer (str) – the layer for which you want tiles fetched. Allowed map layers are specified by the pyowm.tiles.enum.MapLayerEnum enumerator class.
config (dict) – the configuration dictionary
- Returns:
a TileManager instance
- Raises:
AssertionError when no API Key or no map layer is provided, or map layer name is not a string
- get_tile(x, y, zoom)[source]¶
Retrieves the tile having the specified coordinates and zoom level
- Parameters:
x (int) – horizontal tile number in OWM tile reference system
y (int) – vertical tile number in OWM tile reference system
zoom (int) – zoom level for the tile
- Returns:
a pyowm.tiles.Tile instance