set_data {mapboxer}R Documentation

Update the data of a Mapbox source

Description

Update the data of a Mapbox source

Usage

set_data(map, data, source_id = NULL, ...)

## S3 method for class 'character'
set_data(map, data, source_id = NULL, ...)

## S3 method for class 'json'
set_data(map, data, source_id = NULL, ...)

## S3 method for class 'data.frame'
set_data(map, data, source_id = NULL, lng = "lng",
  lat = "lat", ...)

## S3 method for class 'sf'
set_data(map, data, source_id, ...)

Arguments

map

A mapboxer_proxy object.

data

A GeoJSON object, an url pointing to an external GeoJSON document, a data frame that contains longitudes and latitudes in separate columns or an sf-object.

source_id

The ID of the source whose data should be updated.

...

unused

lng

The name of the column containing the longitudes.

lat

The name of the column containing the latitudes.

See Also


[Package mapboxer version 0.4.0 Index]