Add Circle sectors to a Leaflet map from a dataframe using start and end angles
addCircleSectorMinMax.Rd
This methor wraps the setAngles
method of
Leaflet.Circle-sector,
a Leaflet plugin extending
L.Circle.
Usage
addCircleSectorMinMax(
map,
data,
lat = "lat",
lon = "lon",
start_angle = "start_angle",
end_angle = "end_angle",
radius = "radius",
weight = "weight",
colour = "colour",
label = "label",
popup = "popup"
)
Arguments
- map
A leaflet map
- data
A data frame where each row represents on circle sector and columns for lat, lon, min, mid, max.
- lat
The column name as string holding the Latitude of the circle mid point on the map in WGS 84 decimal degrees. Default: "lat".
- lon
The column name as string holding the Longitude of the circle mid point on the map in WGS 84 decimal degrees. Default: "lon".
- start_angle
The column name as string holding the startAngle of the sector in decimal degrees, counted clockwise from North. Default: "start_angle".
- end_angle
The column name as string holding the endAngle of the sector in decimal degrees, counted clockwise from North. Default: "end_angle".
- radius
The column name as string holding the radius of the circle in metres. Default: "radius".
- weight
The column name as string holding the weight of the circle. Default: "weight.
- colour
The column name as string holding the colour of the circle. Default: "colour". Example values: "blue", "red", "#3388ff".
- label
The column name as string holding the label content of the circle. Default: "label".
- popup
The column name as string holding the popup content of the circle. Default: "popup".
See also
Other plugin:
addCircleSectorMid()
,
circlePlugin()
,
leaflet_basemap()
,
registerPlugin()
Examples
if (FALSE) {
data("fans_tracks")
leaflet_basemap(l_height = 500, l_width = 700) %>%
leaflet::clearBounds() %>%
addCircleSectorMinMax(data = fans_tracks)
}