widget_point: Widget Point

Description Usage Arguments Examples

View source: R/spatial_widget.R

Description

Converts an 'sf' object with POINT geometriers into JSON for plotting in an htmlwidget

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
widget_point(
  data,
  fill_colour = NULL,
  fill_opacity = NULL,
  lon = NULL,
  lat = NULL,
  legend = TRUE,
  json_legend = TRUE,
  digits = 6
)

Arguments

data

sf object

fill_colour

string specifying column of sf to use for the fill colour, or a single value to apply to all rows of data

fill_opacity

string specifying column of sf to use for the fill opacity, or a single value to apply to all rows of data

lon

string specifying the column of data containing the longitude. Ignored if using an sf object

lat

string specifying the column of data containing the latitude. Ignored if using an sf object

legend

logical indicating if legend data will be returned

json_legend

logical indicating if the legend will be returned as json

digits

number of decimal places for rounding lon o& lat coordinates. Default 6

Examples

1

spatialwidget documentation built on Aug. 31, 2020, 5:11 p.m.