-
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
popup not working if Polylines are added twice #48
Comments
I'll try to have a look soon. My current focus is not on leafgl though, so it may take a while (also regarding your PRs) |
It seems that both layers are still active, and glify only "sees" the first one. Manually setting the first one to
seems to work. I think this might be a Glify issue, by not handling showing/hiding correctly, but I also might be totally wrong. |
@trafficonese Were you able to solve the problem ? Does the forEach function goes before the popup block ?
|
@paragemini I managed to get it to work with the hack mentioned above, but it's not really a fix. Otherwise I think this has to be fixed in Leaflet Glify and cannot be solved here. |
@paragemini if that hack does not work for you, you should consider raising this issue at https://github.com/robertleeplummerjr/Leaflet.glify |
I want to overlay an already visible Polyline with another one, with a different popup. Interestingly that does not work if the data is part of the already visible layer. I tried the CRAN and current github versions without success.
The click event stops here
leafgl/inst/htmlwidgets/Leaflet.glify/addGlifyPolylines.js
Line 20 in 51e31b1
Interestingly, if the 2nd Polyline uses
data = data[11:nrow(data),]
instead, the example will work.Here is an example to illustrate the problem.
The text was updated successfully, but these errors were encountered: