Skip to contents

Set popup on a map layer

Usage

set_popup(map, layer_id = NULL, popup, layer = NULL, style = NULL)

Arguments

map

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

layer_id

The ID of the layer to update.

popup

Popup content: a column name, a {brace} template, or a concat()/number_format() expression.

layer

Deprecated. Use layer_id instead.

style

Optional popup appearance: a preset string ("light" or "dark") or a tooltip_style()/popup_style() object.

Value

The updated map object.