Learn R Programming

googleway (version 2.0.0)

update_rectangles: Update rectangles

Description

Updates specific colours and opacities of specified rectangles Designed to be used in a shiny application.

Usage

update_rectangles(map, data, id, draggable = NULL, stroke_colour = NULL,
  stroke_weight = NULL, stroke_opacity = NULL, fill_colour = NULL,
  fill_opacity = NULL, layer_id = NULL)

Arguments

map

a googleway map object created from google_map()

data

data.frame containing the new values for the rectangles

id

string representing the column of data containing the id values for the rectangles The id values must be present in the data supplied to add_rectangles in order for the polygons to be udpated

draggable

string specifying the column of data defining if the rectangle is 'draggable' (either TRUE or FALSE)

stroke_colour

either a string specifying the column of data containing the stroke colour of each rectangle, or a valid hexadecimal numeric HTML style to be applied to all the rectangles

stroke_weight

either a string specifying the column of data containing the stroke weight of each rectangle, or a number indicating the width of pixels in the line to be applied to all the rectangles

stroke_opacity

either a string specifying the column of data containing the stroke opacity of each rectangle, or a value between 0 and 1 that will be applied to all the rectangles

fill_colour

either a string specifying the column of data containing the fill colour of each rectangle, or a valid hexadecimal numeric HTML style to be applied to all the cirlces

fill_opacity

either a string specifying the column of data containing the fill opacity of each rectangle, or a value between 0 and 1 that will be applied to all the rectangles

layer_id

single value specifying an id for the layer.