Skip to contents

Create a simple Leaflet map from data

Usage

plot_map_leaflet(
  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
)

Arguments

polygon_data

Polygon data

raster_data

Raster data

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

Value

leaflet::leaflet