Function to return a list of the desired drawing options - you can set all the usual parameters of a call to addPolygons.

polygonDrawOptions(
  stroke = TRUE,
  weight = 5,
  color = c("red", "orange", "green"),
  opacity = 0.5,
  fill = TRUE,
  fillColor = color,
  fillOpacity = 0.2,
  dashArray = NULL,
  smoothFactor = 1,
  noClip = FALSE
)

Arguments

stroke

Whether to draw the polygon borders.

weight

Stroke width in pixels.

color

Stroke colour.

opacity

Stroke opacity.

fill

Whether to fill the polygons in with colour.

fillColor

The fill colour.

fillOpacity

The fill opacity.

dashArray

A string to define the stroke dash pattern.

smoothFactor

How much to simplify polylines on each zoom level.

noClip

Whether to disable polyline clipping.

Value

A list of options governing how the polygons appear on the map

Examples

# show the list polygonDrawOptions()
#> $stroke #> [1] TRUE #> #> $weight #> [1] 5 #> #> $color #> [1] "red" "orange" "green" #> #> $opacity #> [1] 0.5 #> #> $fill #> [1] TRUE #> #> $fillColor #> [1] "red" "orange" "green" #> #> $fillOpacity #> [1] 0.2 #> #> $smoothFactor #> [1] 1 #> #> $noClip #> [1] FALSE #>