You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the enableMeasurePath() and addMeasurePathToolbar() to display areas and perimeters, the thing is that is displaying this information for all circles created by addCircles() as well which is slowing the whole app, i don't want that, i want to display area only for shapes that created manually, is there a workaround for this?
The text was updated successfully, but these errors were encountered:
I just pushed 86285f1 which allows a group argument for addMeasurePathToolbar. Can be a single group, multiple groups or NULL (default), which will work for all layers.
Would that fix your issue?
Here is an example, where the measurements are only allowed for "Group 1".
library(leaflet)
library(leaflet.extras)
n = 50
leaflet() %>%
addTiles() %>%
# Add 3 groups of circles
addCircles(runif(n, -10, 30), runif(n, 35, 70), radius = runif(n, 10000, 50000),
group = "Group 1", color = "red") %>%
addCircles(runif(n, -10, 30), runif(n, 35, 70), radius = runif(n, 10000, 50000),
group = "Group 2", color = "green") %>%
addCircles(runif(n, -10, 30), runif(n, 35, 70), radius = runif(n, 10000, 50000),
group = "Group 3", color = "blue") %>%
# Enable measurements for Group 1 only
addMeasurePathToolbar(group = "Group 1") %>%
addLayersControl(overlayGroups = c("Group 1", "Group 2", "Group 3"))
I'm using the enableMeasurePath() and addMeasurePathToolbar() to display areas and perimeters, the thing is that is displaying this information for all circles created by addCircles() as well which is slowing the whole app, i don't want that, i want to display area only for shapes that created manually, is there a workaround for this?
The text was updated successfully, but these errors were encountered: