class, style='alidade_smooth', resolution='', cache=False)[source]#

Retrieves tiles from

For a full reference on the styles available please see A few of the specific styles that are made available are alidade_smooth, stamen_terrain and osm_bright.

Using the Stadia Maps API requires including an attribution. Please see for details.

For most styles that means including the following attribution:

© Stadia Maps © OpenMapTiles © OpenStreetMap contributors

with Stamen styles additionally requiring the following attribution:

© Stamen Design

  • apikey (str, required) – The authentication key provided by Stadia Maps to query their APIs

  • style (str, optional) – Name of the desired style. Defaults to alidade_smooth. See for a full list of styles.

  • resolution (str, optional) – Resolution of the images to return. Defaults to an empty string, standard resolution (256x256). You can also specify “@2x” for high resolution (512x512) tiles.

  • cache (bool or str, optional) – If True, the default cache directory is used. If False, no cache is used. If a string, the string is used as the path to the cache.

find_images(target_domain, target_z, start_tile=(0, 0, 0))#

Target domain is a shapely polygon in native coordinates.

tile_bbox(x, y, z, y0_at_north_pole=True)#

Return the (x0, x1), (y0, y1) bounding box for the given x, y, z tile position.

  • x – The x tile coordinate in the Google tile numbering system.

  • y – The y tile coordinate in the Google tile numbering system.

  • z – The z tile coordinate in the Google tile numbering system.

  • y0_at_north_pole (optional) – Boolean representing whether the numbering of the y coordinate starts at the north pole (as is the convention for Google tiles) or not (in which case it will start at the south pole, as is the convention for TMS). Defaults to True.


Return extent tuple (x0,x1,y0,y1) in Mercator coordinates.