A remote URL is handed to the application's in-browser vector control, so any
format it reads (GeoParquet, FlatGeobuf, zipped Shapefile, GeoPackage,
GeoJSON, KML, ...) streams without being inlined in the project. A local file
is read with sf and inlined as GeoJSON, since the browser cannot reach a
file on this machine.
Arguments
- map
A GeoLibre widget.
- data
A dataset URL, a local file path, or an
sfobject.- name
Layer name.
- render_mode
"geojson"to load into a GeoJSON source, or"tiles"to stream as vector tiles. Remote URLs only.- data_format
Optional format hint for remote URLs, for example
"parquet"or"flatgeobuf". The control auto-detects when omitted.- source_layer
Optional layer or table name inside a multi-layer container such as a GeoPackage.
- picker
Optional toggle for the control's feature-inspection popup.
- ingest_mode
Optional ingest strategy,
"table"or"stream".- style
Named list of GeoLibre style overrides such as
fillColor,strokeColor, andstrokeWidth.- visible
Whether the layer is initially visible.
- opacity
Layer opacity from zero to one.
- ...
Additional style overrides given as named arguments, merged into
style.add_geojson(map, data, fillColor = "red")andadd_geojson(map, data, style = list(fillColor = "red"))are equivalent.