Closed zeehasham closed 4 years ago
Thanks for the suggestion @zeehasham . Yes I think this is possible given it's one of the available options.
I've made a branch where I've had a go at starting this. Would you mind testing it for me and seeing if it does what you're expecting.
remotes::install_github("SymbolixAU/googleway", ref = "issue224")
library(googleway)
library(sf)
library(sfheaders) ## for converting LINESTRINGS to POINTS
library(mapdeck) ## using the 'roads' data
set_key( secret::get_secret("googleway") )
sf <- mapdeck::roads
sf_pts <- sfheaders::sf_cast( sf, "POINT")
sf_pts <- sf_pts[1:100, ]
The default clustering
google_map() %>%
add_markers(
data = sf_pts
, cluster = T
)
And using min_cluster_size = 5
google_map() %>%
add_markers(
data = sf_pts
, cluster = T
, cluster_options = list(minimumClusterSize = 5)
)
@dcooley Thanks Dave for the prompt response. I tested it and confirm that this works exactly as was required. Let me know when this features becomes a part of release.
I've added all the options, updated the docs for ?add_markers
and merged into master branch.
I'm not sure when I'll have an update on CRAN though. Could be a few weeks.
Hi, Is it possible to pass minimum size of points in cluster as a parameter to add_markers function when cluster=TRUE? There are two benefits