Adding many polylines to R leaflets
Is there a way to add all my polylines at once. Do it below, very slowly ...
At the moment I am doing it through a for loop like this:
leafletProxy("mainMap") %>%
addPolylines(lng = currentGeoData[i,c("CustLon","SerCenterLon")],
lat = currentGeoData[i,c("CustLat","SerCenterLat")],
color = "red")
so every time my variable lng
is a vector of length 2 and my variable is the lat
same.
+3
source to share