f_plot_leaflet: Plot leaflet

View source: R/f - Plot leaflet.R

f_plot_leafletR Documentation

Plot leaflet

Description

Plots leaflet. Ik moet de beschrijving van de input parameters nog verder uitwerken

Usage

f_plot_leaflet(
  c.leaflet.title = "",
  c.legend.title = "",
  c.layer = NULL,
  v.coord.point.midpoint = NULL,
  n.zoom = 13,
  b.zoom.control = TRUE,
  b.save.leaflet = FALSE,
  b.save.pdf = FALSE,
  n.zoom.pdf = 4,
  b.add.date = TRUE,
  b.add.time = TRUE,
  b.add.streetsmart = TRUE,
  df.point = NULL,
  v.coord.point = c("bord.lon", "bord.lat"),
  c.id.point = "bord.id",
  b.show.point.label = TRUE,
  v.info.tag.point.label = NULL,
  v.info.veld.point.label = NULL,
  b.show.point.popup = TRUE,
  v.info.tag.point.popup = NULL,
  v.info.veld.point.popup = NULL,
  df.fill.point = NULL,
  c.fill.factor.point = NULL,
  c.fill.numeric.point = NULL,
  df.weight.point = NULL,
  c.weight.point = NULL,
  n.weight.point = NULL,
  df.stroke.color.point = NULL,
  c.stroke.factor.point = NULL,
  c.stroke.numeric.point = NULL,
  df.stroke.weight.point = NULL,
  c.stroke.weight.point = NULL,
  n.stroke.weight.point = NULL,
  n.opacity.fill = 0.9,
  n.opacity.stroke = 0.9,
  df.line = NULL,
  v.coord.line = c("line.lon", "line.lat"),
  c.id.line = "line.id",
  b.show.line.label = FALSE,
  v.info.tag.line.label = NULL,
  v.info.veld.line.label = NULL,
  b.show.line.popup = FALSE,
  v.info.tag.line.popup = NULL,
  v.info.veld.line.popup = NULL,
  df.color.line = NULL,
  c.color.line = NULL,
  df.weight.line = NULL,
  c.weight.line = NULL,
  n.opacity.line = 1,
  df.polygon = NULL,
  v.coord.polygon = c("polygon.lon", "polygon.lat"),
  c.id.polygon = "polygon.id",
  b.show.polygon.label = TRUE,
  v.info.tag.polygon.label = NULL,
  v.info.veld.polygon.label = NULL,
  b.show.polygon.popup = TRUE,
  v.info.tag.polygon.popup = NULL,
  v.info.veld.polygon.popup = NULL,
  c.fill.numeric.polygon = NULL,
  n.fill.opacity.polygon = 0.3,
  c.stroke.color.polygon = "black",
  n.stroke.weight.polygon = 1,
  b.show.stroke.polygon = TRUE,
  df.text = NULL,
  v.coord.text = c("text.lon", "text.lat"),
  c.text.label = "text.label",
  c.text.direction = "left",
  c.text.color = "black",
  c.text.font.size = "25px",
  n.text.opacity = 1
)

Arguments

c.leaflet.title

Leaflet title; also used for filename.

c.legend.title

Legend title.

c.layer

What feature should be used for layering? (default: NULL).

v.coord.point.midpoint

Option to set the midpoint, else the center of the data will chosen (default: NULL).

n.zoom

At what zoom level should leaflet be opened? (default: 13).

b.zoom.control

Should we include zoom control (default: TRUE).

b.save.leaflet

Should we save the leaflet? (default: FALSE).

b.save.pdf

Should we save the leaflet also as pdf? (default: FALSE).

b.add.streetsmart

Should we add StreetSmart link to pop-up? (default: TRUE).

df.point

POINT - (default: NULL).

v.coord.point

POINT - (default: c("bord.lon", "bord.lat")).

c.id.point

POINT - (default: "bord.id").

b.show.point.label

POINT - (default: TRUE).

v.info.tag.point.label

POINT - (default: NULL).

v.info.veld.point.label

POINT - (default: NULL).

b.show.point.popup

POINT - (default: TRUE).

v.info.tag.point.popup

POINT - (default: NULL).

v.info.veld.point.popup

POINT - (default: NULL).

df.fill.point

POINT - (default: NULL).

c.fill.factor.point

POINT - (default: NULL).

c.fill.numeric.point

POINT - (default: NULL).

df.weight.point

POINT - (default: NULL).

c.weight.point

POINT - (default: NULL).

n.weight.point

Point marker size, in case you want to tune alle markers - (default: NULL).

df.stroke.color.point

POINT - (default: NULL).

c.stroke.factor.point

POINT - (default: NULL).

c.stroke.numeric.point

POINT - (default: NULL

df.stroke.weight.point

POINT - (default: NULL).

c.stroke.weight.point

POINT - (default: NULL).

n.stroke.weight.point

Stroke marker size, in case you want to tune alle markers - (default: NULL).

n.opacity.fill

POINT - opacity of fill (default: 0.9).

n.opacity.stroke

POINT - Opacity of stroke (default: 0.9).

df.line

LINE - (default: NULL).

v.coord.line

LINE - (default: c("line.lon", "line.lat")).

c.id.line

LINE - (default: "line.id").

b.show.line.label

LINE - (default: FALSE).

v.info.tag.line.label

LINE - (default: NULL).

v.info.veld.line.label

LINE - (default: NULL).

b.show.line.popup

LINE - (default: FALSE).

v.info.tag.line.popup

LINE (default: NULL).

v.info.veld.line.popup

LINE - (default: NULL).

df.color.line

LINE - (default: NULL).

c.color.line

LINE - (default: NULL).

df.weight.line

LINE - (default: NULL).

c.weight.line

LINE - (default: NULL).

n.opacity.line

LINE - (default: 1).

df.polygon

POLYGON - (default: NULL).

v.coord.polygon

POLYGON - (default: c("polygon.lon", "polygon.lat")).

c.id.polygon

POLYGON - (default: "polygon.id").

b.show.polygon.label

POLYGON - (default: TRUE).

v.info.tag.polygon.label

POLYGON - (default: NULL).

v.info.veld.polygon.label

POLYGON - (default: NULL).

b.show.polygon.popup

POLYGON - (default: TRUE).

v.info.tag.polygon.popup

POLYGON - (default: NULL).

v.info.veld.polygon.popup

POLYGON - (default: NULL).

c.fill.numeric.polygon

POLYGON - (default: NULL).

n.fill.opacity.polygon

POLYGON - (default: 0.3).

c.stroke.color.polygon

POLYGON - (default: "black").

n.stroke.weight.polygon

POLYGON - (default: 1).

b.show.stroke.polygon

POLYGON - (default: TRUE).

df.text

TEXT - data frame with text data (default: NULL).

v.coord.text

TEXT - features containing coordinates (default: c("text.lon", "text.lat")).

c.text.label

TEXT - feature containing text label (default: "text.label").

c.text.direction

TEXT - Text direction (default: 'left').

c.text.color

TEXT - Test color (default: 'black').

c.text.font.size

TEXT - Text size (default: '25px').

n.text.opacity

TEXT - Text and box opacity (default: 1).

v.add.date, v.add.time

Vector of booleans to specify whether date and/or time should be added.

Details

-

Value

A beautiful leaflet!

Author(s)

Pieter Overdevest

Examples

f_plot_leaflet(

     c.leaflet.title           = "Great Leaflet",
     c.legend.title            = "Legend:",
     c.layer                   = NULL,
     v.coord.point.midpoint    = NULL,
     n.zoom                    = 13,
     b.save.leaflet            = FALSE,
     b.add.date                = TRUE,
     b.add.time                = TRUE,
     b.add.streetsmart         = TRUE,
     df.point                  = NULL,
     v.coord.point             = c("bord.lon", "bord.lat"),
     c.id.point                = "bord.id",
     b.show.point.label        = TRUE,
     v.info.tag.point.label    = NULL,
     v.info.veld.point.label   = NULL,
     b.show.point.popup        = TRUE,
     v.info.tag.point.popup    = NULL,
     v.info.veld.point.popup   = NULL,
     df.fill.point             = NULL,
     c.fill.factor.point       = NULL,
     c.fill.numeric.point      = NULL,
     df.weight.point           = NULL,
     c.weight.point            = NULL,
     n.weight.point            = NULL,
     df.stroke.color.point     = NULL,
     c.stroke.factor.point     = NULL,
     c.stroke.numeric.point    = NULL,
     df.stroke.weight.point    = NULL,
     c.stroke.weight.point     = NULL,
     n.stroke.weight.point     = NULL,
     n.opacity.fill            = 0.9,
     n.opacity.stroke          = 0.9,
     df.line                   = NULL,
     v.coord.line              = c("line.lon", "line.lat"),
     c.id.line                 = "line.id",
     b.show.line.label         = FALSE,
     v.info.tag.line.label     = NULL,
     v.info.veld.line.label    = NULL,
     b.show.line.popup         = FALSE,
     v.info.tag.line.popup     = NULL,
     v.info.veld.line.popup    = NULL,
     df.color.line             = NULL,
     c.color.line              = NULL,
     df.weight.line            = NULL,
     c.weight.line             = NULL,
     n.opacity.line            = 1,
     df.polygon                = NULL,
     v.coord.polygon           = c("polygon.lon", "polygon.lat"),
     c.id.polygon              = "polygon.id",
     b.show.polygon.label      = TRUE,
     v.info.tag.polygon.label  = NULL,
     v.info.veld.polygon.label = NULL,
     b.show.polygon.popup      = TRUE,
     v.info.tag.polygon.popup  = NULL,
     v.info.veld.polygon.popup = NULL,
     c.fill.numeric.polygon    = NULL,
     n.fill.opacity.polygon    = 0.3,
     c.stroke.color.polygon    = "black",
     n.stroke.weight.polygon   = 1,
     b.show.stroke.polygon     = TRUE,
     df.text                   = NULL,
     v.coord.text              = c("text.lon", "text.lat"),
     c.text.label              = "text.label"
)

pieterov/generaltoolbox documentation built on Jan. 25, 2025, 10:32 a.m.