Skip to contents

This function plots a path data.frame. This function is used in plot.map().

Usage

plot_path(
  path,
  plot_leaflet = TRUE,
  provider = "Esri.WorldTopoMap",
  provider_options = leaflet::providerTileOptions(),
  pad = 3,
  ...
)

Arguments

path

a GeoPressureR path data.frame.

plot_leaflet

logical defining if the plot is an interactive leaflet map or a static basic plot.

provider

the name of the provider (see https://leaflet-extras.github.io/leaflet-providers/preview/ and https://github.com/leaflet-extras/leaflet-providers)

provider_options

tile options. See leaflet::addProviderTiles() and leaflet::providerTileOptions()

pad

padding of the map in degree lat-lon (only for plot_leaflet = FALSE).

...

additional parameters for plot_path_leaflet()

Value

modified map object

See also

Examples

setwd(system.file("extdata", package = "GeoPressureR"))
tag <- tag_create("18LX", quiet = TRUE) |>
  tag_label(quiet = TRUE) |>
  tag_set_map(c(-16, 23, 0, 50), scale = 1)
path <- ind2path(c(1652, 1603, 1755, 1708, 1607), tag)

plot_path(path)