Skip to contents

Create a map

geolibre()
Create a GeoLibre widget

Vector layers

Vector data from GeoJSON, sf, or any format the browser can stream.

add_geojson()
Add GeoJSON to a GeoLibre map
add_sf()
Add an sf object to a GeoLibre map
add_data()
Add data, optionally symbolized by a column
add_choropleth()
Add a data-driven choropleth layer
add_vector()
Add a vector dataset from a URL or local file
add_geoparquet()
Add a GeoParquet layer
add_flatgeobuf()
Add a FlatGeobuf layer
add_shp()
Add a Shapefile layer
add_kml()
Add a KML or KMZ layer
add_gpkg()
Add a GeoPackage layer

Points and markers

add_marker()
Add a single point marker
add_markers()
Add point markers
add_circle_markers()
Add circle markers
add_marker_cluster()
Add clustered point markers
add_heatmap()
Add a point density heatmap
add_xy_data()
Add points from tabular longitude and latitude columns
add_csv()
Add a CSV of point coordinates

Rasters, tiles, and services

add_raster()
Add a remote raster to a GeoLibre map
add_cog()
Add a Cloud Optimized GeoTIFF layer
add_tile_layer()
Add an XYZ raster tile layer
add_wms()
Add a WMS layer
add_wmts()
Add a WMTS layer
add_wfs()
Add a WFS layer
add_vector_tiles()
Add a vector tile layer from a TileJSON endpoint
add_pmtiles()
Add a PMTiles layer
add_3d_tiles()
Add a 3D Tiles layer
add_video()
Add a georeferenced video layer

Work with layers

Every function here addresses a layer by its id or its name.

get_layers()
Summarize a project's layers
get_layer()
Read one layer's full definition
layer_names()
Layer names in draw order
find_layer_index()
Position of a layer in the draw order
set_layer_visibility() show_layer() hide_layer()
Show or hide a layer
set_layer_opacity()
Set a layer's opacity
set_layer_style()
Restyle a layer
classify_layer()
Symbolize an existing layer as a choropleth
rename_layer()
Rename a layer
move_layer()
Move a layer in the draw order
duplicate_layer()
Duplicate a layer
remove_layer()
Remove a layer
clear_layers()
Remove every layer
layer_properties()
Sample a layer's feature properties
column_values()
Read one feature property across a layer

Camera and basemap

set_view()
Set the GeoLibre camera
set_center()
Center the map
set_zoom()
Set the map zoom
set_bearing()
Set the camera bearing
set_pitch()
Set the camera pitch
fit_bounds()
Frame a bounding box
set_basemap() add_basemap()
Set the background basemap
set_project_name()
Set the project name

Map controls

add_legend()
Add a legend to the map
add_colorbar()
Add a colorbar to the map
add_colormap()
Add a colorbar from a named color ramp
split_map()
Add a split-map comparison slider

Catalogs

The basemaps, color ramps, and legend presets the application ships.

basemaps()
Named GeoLibre basemaps
color_ramp_names()
Available color ramp names
get_color_ramp()
Anchor colors of a color ramp
interpolate_ramp_colors()
Sample a color ramp into evenly spaced colors
builtin_legend_names()
Built-in legend preset names

Projects and export

load_project()
Read a GeoLibre project
save_project()
Save a GeoLibre project
get_project()
Read a project out of a widget
describe_project()
Summarize a GeoLibre project
to_html()
Export a map as a standalone HTML page
redact_credentials()
Strip credentials from a whole project
redact_layer()
Strip credentials from one layer
redact_url()
Strip credentials from a URL

Shiny

Render a widget, then drive the live map through a proxy.

geolibreOutput() renderGeolibre()
Shiny bindings for GeoLibre
geolibre_proxy()
Create a GeoLibre Shiny proxy
update_geolibre()
Replace the project displayed by a GeoLibre Shiny widget
geolibre_command()
Send a command to a live GeoLibre map
geolibre_fly_to()
Animate the camera of a live GeoLibre map
geolibre_fit_bounds()
Fit a live GeoLibre map to a bounding box
geolibre_zoom_to_layer()
Zoom a live GeoLibre map to a layer's extent
geolibre_get_view()
Read the camera of a live GeoLibre map
geolibre_identify()
Identify features at a point on a live GeoLibre map
geolibre_layer_features() geolibre_selected_features() geolibre_drawn_features()
Read features from a live GeoLibre map
geolibre_run_algorithm() geolibre_list_algorithms()
Run a processing algorithm on a live GeoLibre map
geolibre_to_image()
Capture a live GeoLibre map as a PNG