add_popups: Add a popup label when a feature is clicked on a Leaflet web...

View source: R/fct_add_popups.R

add_popupsR Documentation

Add a popup label when a feature is clicked on a Leaflet web map

Description

add_popups creates a popup label containing values of selected columns for a feature selected through an on-click event on a leaflet web map.

Usage

add_popups(in_df, layer_id, label_vars)

Arguments

in_df

an sf data frame object that is displayed on the leaflet web map.

layer_id

The layerId of the feature selected / clicked on by the user.

label_vars

The column(s) from in_df selected to be displayed in the popup.

Value

a html popup label to be displayed on the Leaflet web map.


livelihoods-and-landscapes/maplandscape documentation built on March 20, 2023, 5:43 a.m.