Learn R Programming

mapgl (version 0.2.1)

set_source: Set source of a map layer

Description

Set source of a map layer

Usage

set_source(map, layer, source)

Value

The updated map object.

Arguments

map

A map object created by the mapboxgl or maplibre function, or a proxy object.

layer

The ID of the layer to update.

source

An sf object (which will be converted to a GeoJSON source).