cartopy.io.img_tiles.MapboxTiles¶
- class cartopy.io.img_tiles.MapboxTiles(access_token, map_id, cache=False)[source]¶
Implement web tile retrieval from Mapbox.
For terms of service, see https://www.mapbox.com/tos/.
- __init__(access_token, map_id, cache=False)[source]¶
Set up a new Mapbox tiles instance.
Access to Mapbox web services requires an access token and a map ID. See https://www.mapbox.com/api-documentation/ for details.
- Parameters
access_token (str) – A valid Mapbox API access token.
map_id (str) –
An ID for a publicly accessible map (provided by Mapbox). This is the map whose tiles will be retrieved through this process and is specified through the Mapbox Styles API (https://docs.mapbox.com/api/maps/styles/)
Examples:
map_id='streets-v11' map_id='outdoors-v11' map_id='satellite-v9'
Methods
__init__
(access_token, map_id[, cache])Set up a new Mapbox tiles instance.
find_images
(target_domain, target_z[, ...])Target domain is a shapely polygon in native coordinates.
get_image
(tile)image_for_domain
(target_domain, target_z)subtiles
(x_y_z)tile_bbox
(x, y, z[, y0_at_north_pole])Return the
(x0, x1), (y0, y1)
bounding box for the given x, y, z tile position.tileextent
(x_y_z)Return extent tuple
(x0,x1,y0,y1)
in Mercator coordinates.