Data
I have a dataframe which contains 35,000 lat/lon locations. The locations have been plotted onto an interactive leaflet map.
The S
There are a couple options I can think that might help. The best would probably be to make clusters (see Marker Clusters):
addMarkers(..., clusterOptions = markerClusterOptions())
This prevents all 35 000 points from rendering at once which speeds up the loading time.
addCircles() and addCircleMarkers() seem to load quicker than addMarkers() as well if they're okay for your purposes although they're still slow with 35 000 points.
You could then do:
addCircleMarkers(..., clusterOptions = markerClusterOptions())
which should load even faster.
Update
Use leaflet.glify (devtools::install_github("tim-salabim/leaflet.glify")
)
[Now leafgl (devtools::install_github("r-spatial/leafgl")
) - see comment below.]
See leaflet.glify [Now leafgl - see comment below.]