I want to create the smallest grid as possible in leaflet R. How should I go about it ?
My current code is :-
leaflet()%>%
addTiles() %>%
setView(lng = 101.9758, lat = 4.21053, zoom = 10)) %>%
addGraticule(interval = 0.02, sphere = FALSE) %>%
addMarkers(101.6995, 3.1473)
Here the picture output from the code before zoom

Here the picture after zoom in

The grid quite large after I zoom in but if I change addGraticule(interval = 0.01), my laptop hang and no output result. I want the grid to be small as picture below
Is there other way I can achieve my aim?
I found other function that might help which is
addSimpleGraticule(
map,
interval = 20,
showOriginLabel = TRUE,
redraw = "move",
hidden = FALSE,
zoomIntervals = list(),
layerId = NULL,
group = NULL
)
zoomIntervals :- use different intervals in different zoom levels. If not specified, all zoom levels use value in interval option.
But I'm not sure how to specify zoomIntervals arguments.



