How do you cluster markers in Google Maps in R using googleway
package?
I tried to use the option add_markers("cluster = TRUE ") but without success
Here is a reproducible example and the map that I get:
library(googleway)
key <- "my_google_map_API"
df <- data.frame(
lat = c(45.77740319999999,45.77740319999999,46.77740319999999,46.77740319999999),
lon = c(4.855214400000023,4.955214400000023,4.855214400000023,4.955214400000023))
google_map(key = key, height = 600, search_box = T) %>%
add_markers(data = df,cluster = TRUE)
Thank you very much