Expand description
Basemap: a map view to render, the Rust counterpart of R’s
basemap() and Python’s basemapper.basemap() / Basemap.
The same verbs exist in all three languages: R verb(m, ...), Python
m.verb(...), Rust m.verb(...):
| Task | Rust |
|---|---|
| create | Basemap::new(style) + .size(), .center(), .zoom(), .bounds(), .pixel_ratio(), … |
| change the view | set_view(center, zoom), set_bounds(bounds, crs) |
| read the view | get_bounds(lonlat), get_center(), get_zoom(), get_size() |
| render | render_array(), render_png(path), render_svg(path, options) |
Structs§
- Basemap
- A map view: one style, or several stacked bottom to top, a size in CSS
pixels, a centre and MapLibre zoom (512 px tiles, fractional allowed),
and a device pixel ratio (images are
pixel_ratiotimes larger with the same view and label layout).
Enums§
- Crs
- Coordinate reference system of bounds given to
Basemap::set_bounds: the core reads longitude/latitude and Web Mercator (R and Python reproject other CRSs before calling it).