if (FALSE) {
style <- paste0('{
"property" : "AREASQKM",
"value" : 5,
"operator" : ">=",
"features" : {
"fillColor" : "red",
"strokeColor" : "red"
}
}')
google_map(key = map_key) %>%
add_geojson(data = geo_melbourne) %>%
update_geojson(style = style)
lst_style <- list(property = "AREASQKM", operator = "<=", value = 5,
features = list(fillColor = "red",
strokeColor = "red"))
google_map(key = map_key) %>%
add_geojson(data = geo_melbourne) %>%
update_geojson(style = lst_style)
## Styling a specific feature
style <- '{"property" : "SA2_NAME", "value" : "Abbotsford", "features" : { "fillColor" : "red" } }'
google_map(key = map_key) %>%
add_geojson(data = geo_melbourne) %>%
update_geojson(style = style)
}
Run the code above in your browser using DataLab