-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have more than one pop-up in the same map? #92
Comments
Can we get a reproducible example showing the issue? |
Yes. Here is an open dataset: library(leaflet) data("hawaii") my_data<-sf::st_cast(hawaii,"POLYGON")%>% set.seed(42) #create data #create palette palFunc_objective_1 <- leaflet::colorNumeric(viridis::cividis(nrow(my_data)), palFunc_objective_2 <- leaflet::colorNumeric(viridis::cividis(nrow(my_data)), all_groups_leaflet<-c("obj_1","obj_3") leaflet::leaflet() %>% leafgl::addGlPolygons(data = my_data, leaflet::hideGroup(all_groups_leaflet)%>% |
Hi,
I have a map with several layers. I want to display a pop-up with the data of the layer that is on, but I can't do it. The only pop-up that shows is from the last layer created (it overwrites the other). In the figure below, obj_1 does not show any pop-up when clicking, but obj_3 does (the last layer created).
Is there a way to have one pop-up per layer?
Thanks!
The text was updated successfully, but these errors were encountered: