Which external services are compatible with GeoServer?

Mapbox works. It requires an API key which can be retrieved for free, for information about pricing read this.

Mapbox has many beautiful map styles, and also the ability for you to create your own map styles or modify existing ones with their browser based tool.

Here is a list of default styles that everyone has access to:

styles = {"streets", "light", "dark", "satellite", 
   "streets-satellite", "wheatpaste", "streets-basic", "comic", 
   "outdoors", "run-bike-hike", "pencil", "pirates", "emerald", 
   "high-contrast"};

Here is a template for using Mapbox with GeoGraphics:

token = (* your API key here *);
style = "outdoors";
st[style_] := StringTemplate["https://api.mapbox.com/v4/mapbox." <> style <> "/``/``/``.png?access_token=" <> token];

GeoGraphics[
 GeoRange -> Entity["City", {"Goteborg", "VastraGotaland", "Sweden"}],
 GeoServer -> {st[style], "ZoomRange" -> {1, 22}}
 ]

Mathematica graphics

Here is an example using the "pirates" style:

Mathematica graphics

And another one, also depicting Gothenburg, using the "pencil" style:

Mathematica graphics


The keywords to search for are "tile server" and "XYZ URL". I was able to find several services compatible with this format.

There is a list, complete with previews here:

  • https://leaflet-extras.github.io/leaflet-providers/preview/

(Found through GIS.SE)

The {x}, {y} and {z} placeholders in the URL correspond to `1`, `2` and `3` in Mathematica.

MapBox is another great source for base maps, as shown by @C.E. in his answer.


Here are a few examples that do not require API keys:

From https://basemap.nationalmap.gov/,

USGS[map :"HydroCached" | "ImageryOnly" | "ImageryTopo" |"ShadedReliefOnly" | "Topo"] :=
 "https://basemap.nationalmap.gov/arcgis/rest/services/USGS" <> map <> "/MapServer/tile/`1`/`3`/`2`"

From https://carto.com/location-data-services/basemaps/,

carto[style : "light_all" | "dark_all" | "light_nolabels" | "light_only_labels" |"dark_nolabels" | "dark_only_labels"] :=
 "https://cartodb-basemaps-1.global.ssl.fastly.net/" <> style <> "/`1`/`2`/`3`.png"

From http://maps.stamen.com/,

stamenBase[style_, format_] := "http://tile.stamen.com/" <> style <> "/`1`/`2`/`3`." <> format
stamen[style : "toner"] := stamenBase[style, "png"]
stamen[style : "watercolor" | "terrain"] := stamenBase[style, "jpg"]

Demo:

GeoGraphics[Entity["AdministrativeDivision", {"California", "UnitedStates"}], 
   GeoServer -> #] & /@ {USGS["Topo"], carto["light_all"], stamen["terrain"]}

enter image description here

These are just quick and dirty examples. In some cases it may be beneficial or necessary to set the "Tileset" suboption of GeoServer (see under Details in doc page).


Tile servers can also be used with the interactive DynamicGeoGraphics:

DynamicGeoGraphics[Entity["City", {"Lyon", "RhoneAlpes", "France"}], 
 GeoServer -> stamen["toner"]]

enter image description here


This specific usage in the documentation confused me momentarily as there is a server for serving mapping features called specifically GeoServer.

However, I think in this usage they mean any kind of server that can provide GIS data.

On the documentation page they specify what the remote server must accept as a request string.

The URL template for tile download uses the XYZ protocol and must be given as a string "http://…/`1`/`2`/`3`.png" or as StringTemplate["http://…/`1`/`2`/`3`.png"]...

This URI is in the Tile Map Service (TMS/WTMS) specification for serving raster data from a server. Most tile servers accept TMS specification as it is standard created by the Open Geospatial Consortium, an organization created to help standardise GIS interoperability.

In the example you provide, they are accessing OpenStreetMaps' own tile server to provide tiles for the slippymap. If you didn't specify the server the map service would use the default values, which appear to be Wolfram's own servers.