Skip to contents

Package

basemapper basemapper-package
basemapper: Headless Spatial Basemap Renderer

Basemap views

Create a view (basemap()), change it (set_view(), set_bounds()), read it (get_bounds(), get_center(), get_zoom(), get_size()) and render it (render_png(), render_svg(), render_array(), render_raster()). The same functions and arguments exist in Python.

basemap()
Create a basemap view
set_view() set_bounds()
Change a basemap view
get_bounds() get_center() get_zoom() get_size()
Read a basemap view
render_png() render_svg() render_array() render_raster()
Render a basemap view
plot(<basemap>) knit_print(<basemap>)
Show a basemap view

One-shot rendering

Render bounds to a georeferenced RGBA array in one call.

render_basemap_raw()
Render a basemap for bounds in one call

Plot integrations

Drop a basemap layer into an existing plot, rendered at the output resolution. geom_basemap() takes the same arguments in ggplot2 and plotnine (Python).

geom_basemap()
Add a styled basemap layer to a ggplot2 spatial plot.
GeomBasemap
ggproto class for basemap rendering inside a ggplot2 panel.
tm_basemap()
Add a styled basemap layer to a tmap v4 pipeline.

Styles

Named basemaps (leaflet-providers names, usable as style), styles for your own tile data, and OGC services. Tile data (tile URLs, TileJSON, PMTiles, ArcGIS services) also works as style directly.

basemap_provider()
Named basemaps
list_providers()
The built-in basemaps
providers
Basemap names, for autocompletion
tile_style()
A style for tile data
wms_style() wmts_style()
Styles for OGC services

Style layers and attribution

A style’s layers with their features, for the layers and features filters, and the attribution text it asks maps to show.

list_layers()
List a style's layers, or preview a filter
get_attribution()
The attribution a style asks maps to show

Tile cache

tile_cache()
The tile cache

Coordinate utilities

Internal helpers exposed for advanced use.

reproject_bbox_to_3857()
Reproject a bounding box to EPSG:3857 (Web Mercator).
detect_crs_from_coord()
Detect the EPSG code from a ggplot2 coord/panel_params object.