Creates an htmlwidget that embeds the GeoLibre geographic information
system. The widget carries a .geolibre.json project, which the add_*(),
set_*(), and control functions build up with the pipe.
Usage
geolibre(
project = NULL,
center = NULL,
zoom = NULL,
basemap = NULL,
name = "Untitled Project",
width = NULL,
height = NULL,
app_url = getOption("geolibre.app_url", "https://web.geolibre.app/"),
layout = c("embed", "full", "maponly"),
theme = c("light", "dark"),
map_only = FALSE,
elementId = NULL,
panels = c("expanded", "collapsed", "hidden")
)Arguments
- project
A GeoLibre project list, a path to a
.geolibre.jsonfile, orNULLfor a new project.- center
Optional initial
c(longitude, latitude)map center.- zoom
Optional initial zoom level.
- basemap
Optional basemap name from
basemaps()or a MapLibre style JSON URL. Ignored whenprojectis supplied, which carries its own.- name
Project name recorded in the project file.
- width, height
Widget dimensions passed to
htmlwidgets::createWidget().- app_url
URL of a GeoLibre web deployment. It must support the
?embed=1project bridge.- layout
Application chrome to show:
"embed"(compact controls),"full"(the complete desktop interface), or"maponly"(map only).- theme
Application theme,
"light"or"dark".- map_only
Deprecated.
TRUEis equivalent tolayout = "maponly".- elementId
Optional widget element ID.
- panels
Initial side-panel state:
"expanded","collapsed"(icon rails remain available), or"hidden".
Details
The default hosted application requires internet access when the
widget is displayed. Package installation, project construction, and file
operations do not contact it. Set app_url or the geolibre.app_url
option to use a self-hosted deployment.