Learn R Programming

MazamaLocationUtils (version 0.2.0)

table_leaflet: Leaflet interactive map for known locations

Description

This function creates interactive maps that will be displayed in RStudio's 'Viewer' tab.

Usage

table_leaflet(
  locationTbl = NULL,
  maptype = "terrain",
  extraVars = NULL,
  locationOnly = FALSE,
  ...
)

Arguments

locationTbl

Tibble of known locations.

maptype

Optional name of leaflet ProviderTiles to use, e.g. terrain.

extraVars

Character vector of addition locationTbl column names to be shown in leaflet popups.

locationOnly

Logical specifying whether to check for all standard columns.

...

Additional arguments passed to leaflet::addCircleMarker().

Value

A leaflet "plot" object which, if not assigned, is rendered in Rstudio's 'Viewer' tab.

Details

The maptype argument is mapped onto leaflet "ProviderTile" names. Current mappings include:

  1. "roadmap" -- "OpenStreetMap"

  2. "satellite" -- "Esri.WorldImagery"

  3. "terrain" -- "Esri.WorldTopoMap"

  4. "toner" -- "Stamen.Toner"

If a character string not listed above is provided, it will be used as the underlying map tile if available. See https://leaflet-extras.github.io/leaflet-providers/ for a list of "provider tiles" to use as the background map.