View source: R/google_map_layer_rectangle.R
update_rectangles | R Documentation |
Updates specific colours and opacities of specified rectangles Designed to be used in a shiny application.
update_rectangles(
map,
data,
id,
draggable = NULL,
stroke_colour = NULL,
stroke_weight = NULL,
stroke_opacity = NULL,
fill_colour = NULL,
fill_opacity = NULL,
info_window = NULL,
layer_id = NULL,
digits = 4,
palette = NULL,
legend = F,
legend_options = NULL
)
map |
a googleway map object created from |
data |
data frame containing the data to use in the layer. If Null, the
data passed into |
id |
string representing the column of |
draggable |
string specifying the column of |
stroke_colour |
either a string specifying the column of |
stroke_weight |
either a string specifying the column of |
stroke_opacity |
either a string specifying the column of |
fill_colour |
either a string specifying the column of |
fill_opacity |
either a string specifying the column of |
info_window |
string specifying the column of data to display in an info window when a shape is clicked. |
layer_id |
single value specifying an id for the layer. Use this value to
distinguish between shape layers for when using any |
digits |
integer. Use this parameter to specify how many digits (decimal places) should be used for the latitude / longitude coordinates. |
palette |
a function, or list of functions, that generates hex colours given a single number as an input. See details. |
legend |
either a logical indiciating if the legend(s) should be displayed, or a named list indicating which colour attributes should be included in the legend. |
legend_options |
A list of options for controlling the legend. |
Any rectangles (as specified by the id
argument) that do not exist
in the data
passed into add_rectangles()
will not be added to the map.
This function will only update the rectangles that currently exist on the map when
the function is called.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.