mapgl
R bindings for MapLibre GL JS
Maintained by Kyle Walker
mapgl provides R bindings for MapLibre GL JS, allowing R users to create interactive maps and geospatial visualizations. It integrates seamlessly with the R ecosystem and provides a familiar API for R developers working with spatial data and creating web-based mapping applications.
Quick start
install.packages("mapgl")library(mapgl)
maplibre(
style = "https://tiles.openfreemap.org/styles/liberty",
center = c(-43.23412, -22.91370),
zoom = 14
)›Setup noteschecked with v0.5.0
The map is an htmlwidget, so it shows in the RStudio viewer, in Quarto or R Markdown output, or in Shiny through maplibreOutput(). openfreemap_style("liberty") is a built-in helper that returns the same style URL.
Other platforms are on SDKs.