Skip to content

Commit

Permalink
Switch away from Stamen basemaps (#2717)
Browse files Browse the repository at this point in the history
Document switch of the default source
to OpenStreetMap Humanitarian web tiles following contextily. Changed
load_tile_map's inline example to use
OpenTopoMap, and tilemap gallery
example to use CartoDB Positron.
  • Loading branch information
weiji14 authored Oct 5, 2023
1 parent 0705846 commit 4d289b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/gallery/maps/tilemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
fig.tilemap(
region=[-157.84, -157.8, 21.255, 21.285],
projection="M12c",
# Use the Stamen.Watercolor option from contextily
source=contextily.providers.Stamen.Watercolor,
# Use the CartoDB Positron option from contextily
source=contextily.providers.CartoDB.Positron,
frame="afg",
)

Expand Down
6 changes: 3 additions & 3 deletions pygmt/datasets/tile_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def load_tile_map(region, zoom="auto", source=None, lonlat=True, wait=0, max_ret
:class:`xyzservices.TileProvider` object. See
:doc:`Contextily providers <contextily:providers_deepdive>` for a
list of tile providers [Default is
``xyzservices.providers.Stamen.Terrain``, i.e. Stamen Terrain web
tiles].
``xyzservices.providers.OpenStreetMap.HOT``, i.e. OpenStreetMap
Humanitarian web tiles].
- A web tile provider in the form of a URL. The placeholders for the
XYZ in the URL need to be {x}, {y}, {z}, respectively. E.g.
``https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png``.
Expand Down Expand Up @@ -96,7 +96,7 @@ def load_tile_map(region, zoom="auto", source=None, lonlat=True, wait=0, max_ret
>>> raster = load_tile_map(
... region=[-180.0, 180.0, -90.0, 0.0], # West, East, South, North
... zoom=1, # less detailed zoom level
... source=contextily.providers.Stamen.TerrainBackground,
... source=contextily.providers.OpenTopoMap,
... lonlat=True, # bounding box coordinates are longitude/latitude
... )
>>> raster.sizes
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/tilemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def tilemap(
:class:`xyzservices.TileProvider` object. See
:doc:`Contextily providers <contextily:providers_deepdive>` for a
list of tile providers [Default is
``xyzservices.providers.Stamen.Terrain``, i.e. Stamen Terrain web
tiles].
``xyzservices.providers.OpenStreetMap.HOT``, i.e. OpenStreetMap
Humanitarian web tiles].
- A web tile provider in the form of a URL. The placeholders for the
XYZ in the URL need to be {{x}}, {{y}}, {{z}}, respectively. E.g.
``https://{{s}}.tile.openstreetmap.org/{{z}}/{{x}}/{{y}}.png``.
Expand Down

0 comments on commit 4d289b2

Please sign in to comment.