SymbolixAU / googleway

R Package for accessing and plotting Google Maps
http://symbolixau.github.io/googleway/
Other
234 stars 46 forks source link

Why not update_markers()? #250

Open jaahumadap opened 2 years ago

jaahumadap commented 2 years ago

Using google_maps() in shiny and frequently need to update the markers on a map. Right now have to do:

google_map_update(map_id = "my_map") %>%
clear_markers() %>%
add_markers(data = new_data, id = location, lat = "lat", lon = "lon")

Is this in the pipeline for development? Thanks,

dcooley commented 2 years ago

I hadn't considered this as an option, but it makes sense to have an upate_markers() function as you suggest. And it should be a fairly simple wrapper around clear_ and add_, but in javascript rather than the R-side.

I'm not sure when I'll get around to implementing it though.