Skip to main content

Module providers

Module providers 

Source
Expand description

Named basemaps and OGC service styles.

The catalogue behind basemap_provider() and list_providers() in R and Python, so all three languages return the same style for the same name. Names follow leaflet-providers (CartoDB.Positron, Esri.WorldImagery, OpenStreetMap.HOT); basemaps leaflet lacks (OpenFreeMap) use the same Provider.Variant form. An entry has a vector form (a MapLibre style), a raster form (tiles), or both; the vector form is the default.

Tile URLs, TileJSON, PMTiles archives and ArcGIS services need no entry: they are accepted as style directly, and crate::tile_style() builds their style with overrides.

Structs§

ApiKey
The API key a basemap needs.
Provider
A catalogue entry.
ProviderOptions
Options for basemap_provider.
Raster
The raster form of a basemap.

Constants§

PROVIDERS
Every basemap basemap_provider() accepts.

Functions§

basemap_provider
A named basemap’s style: a style URL for the vector form, inline style JSON for the raster form (or for either with tiles). See PROVIDERS. A stacked basemap (UGRC.Lite) has several: see basemap_provider_styles.
basemap_provider_styles
A named basemap’s styles: one for most basemaps (as basemap_provider), several, bottom to top, for a basemap published as separate services (UGRC.Lite: hillshade, base, labels). labels and features apply to the stack as one basemap: a style they leave nothing of is left out, and it is an error when they leave nothing of any. Pass the result to crate::Basemap::stack.
expand_stacks
styles with every stacked basemap’s name (UGRC.Lite) replaced by its styles, bottom to top; other styles as they are.
find_provider
The catalogue entry for name (case-insensitive; Carto. and OSM. work for CartoDB. and OpenStreetMap., and earlier names still work).
list_providers
The basemaps that come in kind (all with None), in catalogue order.
stack_provider
The catalogue entry of a stacked basemap’s name (UGRC.Lite), if name is one.
wms_style
A WMS GetMap endpoint as 256 px raster tiles in EPSG:3857, through MapLibre’s {bbox-epsg-3857} token (filled in per tile). WMS 1.1.x names the projection SRS, 1.3.0 CRS.
wmts_style
A WMTS GetTile (KVP) endpoint as 256 px raster tiles.