The object is transformed to EPSG:4326 before serialization. An object with no CRS is taken to be in longitude/latitude order already, since that is what GeoJSON means.
Usage
add_sf(
map,
data,
name = NULL,
style = list(),
visible = TRUE,
opacity = 1,
...
)Arguments
- map
A GeoLibre widget.
- data
An
sf,sfc, orsfgobject.- name
Layer name. Defaults to the expression passed as
data.- 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.