Skip to contents

NOTE that the mapview backend is only intended for quick viewing of data, most of the customisation arguments are not available.

Usage

plot_map(
  polygon_data = NULL,
  raster_data = NULL,
  domain = NULL,
  markers = NULL,
  palette = "viridis",
  legend_title = NULL,
  add_scale_bar = FALSE,
  polygon_fill_colour = "#E4572E",
  polygon_line_colour = "grey",
  polygon_line_weight = 1,
  polygon_fill_opacity = 0.6,
  reverse = FALSE,
  wrapping = FALSE,
  backend = "leaflet"
)

Arguments

polygon_data

Polygon data

raster_data

Raster datas

domain

Domain data to be passed to leaflet::colorNumeric and leaflet::addLegend

markers

Markers to display on map. A named list with latitude, longitude and label names must be given.

palette

Palette to be used for colours, defaults to viridis

legend_title

Title for legend

add_scale_bar

Add scale bar if TRUE

polygon_fill_colour

Polygon fill colour

polygon_line_colour

Polygon surrounding line colour

polygon_line_weight

Polygon surrounding line weight

polygon_fill_opacity

Leaflet polygon fill opacity, float from 0 to 1.0, passed to fillOpacity of leaflet::addPolygons

reverse

Reverse the colour palette if TRUE

wrapping

Split polygons along the antimeridian (-180/180 boundary) if TRUE

backend

Backend package to use for plotting, either "leaflet" or "mapview"

Value

leaflet::leaflet or mapview::mapview

Details

The leaflet backend will work for most use cases and is recommended. For plotting of maps with UTM coordinates, the mapview backend is recommended.