Skip to content

Basemaps

A tab of public basemaps and overlays for RustGIS: OpenStreetMap, Esri, USGS and NASA raster tiles, OpenFreeMap and VersaTiles vector maps, and overlays for labels, roads, railways, trails and sea marks. It is RustGIS's counterpart of maplibre-gl-basemap-control.

Every basemap here works without an API key. (CARTO's raster basemaps now need one, so they aren't included; OpenFreeMap Positron is a keyless vector equivalent of CARTO Positron.) Choosing a basemap replaces the web basemap on the map; overlays stack on top of it, and choosing an overlay again removes it. Clear Basemaps goes back to RustGIS's built-in basemap. The tile layers are saved with the project, and their credits are shown in the corner of the map and in exports.

Basemaps are also commands, so command search finds them (type "Esri" or "dark"), and scripts and the command line can run them:

rustgis-cli run --sample --plugin basemaps-0.1.0.rgplugin \
  --cmd 'plugin:basemaps/openfreemap-liberty' \
  --cmd 'plugin:basemaps/esri-places' \
  --cmd 'share.exportMap={"path":"map.png"}'

A basemap command takes {"add": true} to stack it over the current basemaps instead of replacing them.

For a service that isn't listed (or one that needs a key), use Map › Basemap › Add Tile Layer… in RustGIS, which takes any XYZ/TMS/WMS template, vector tiles or MapLibre style address.

Its tab

Basemaps, at the end of the ribbon's tab strip:

  • Popular: OpenStreetMap, Esri World Imagery, OpenFreeMap Positron, OpenFreeMap Liberty
  • Streets: OpenStreetMap ▾ (6), Esri ▾ (6)
  • Imagery & Terrain: Imagery ▾ (5), Terrain ▾ (7)
  • Vector: OpenFreeMap ▾ (6), VersaTiles ▾ (5)
  • Overlays: Labels ▾ (3), Lines ▾ (6)
  • Manage: Clear Basemaps, Clear Overlays, Current

Terms of use

The tiles come from their providers, under their terms: credit them (RustGIS does, from each layer's attribution) and keep to their usage policies. In particular, the OpenStreetMap tile servers are for light, interactive use, not bulk downloading. Esri's, USGS's and NASA's services have terms of their own; check them before heavy or commercial use.

Permissions

edit and network (adding web tile layers, which the map loads from the providers' servers)

Build

cargo build --release --target wasm32-unknown-unknown -p basemaps

plugin.json's commands and src/catalog.rs are generated by generate.py from one table (python plugins/basemaps/generate.py && cargo fmt -p basemaps); a test checks they agree.


Version 0.1.2 · Source · Permissions: edit, network