as_mapbox_source {mapboxer} | R Documentation |
Convert a data object to a Mapbox GeoJSON source
Description
Convert a data object to a Mapbox GeoJSON source
Usage
as_mapbox_source(data, ...)
## S3 method for class 'json'
as_mapbox_source(data, ...)
## S3 method for class 'data.frame'
as_mapbox_source(data, lng = "lng", lat = "lat",
...)
## S3 method for class 'sf'
as_mapbox_source(data, ...)
Arguments
data |
A data frame that contains longitudes and latitudes in separate columns
or an |
... |
The properties of the source. See https://docs.mapbox.com/mapbox-gl-js/style-spec/sources for available options for the given source type. |
lng |
The name of the column containing the longitudes. |
lat |
The name of the column containing the latitudes. |
[Package mapboxer version 0.4.0 Index]