Open cschuster89 opened 3 months ago
This is still a problem in the underlying library https://github.com/robertleeplummerjr/Leaflet.glify/issues/137
Ok, I see. Thanks for the quick reply and the reference to the underlying problem.
No worries :) but let's keep it open, as it's still a bug in this library aswell.
I have an open pull request on the leaflet.glify repo which should solve this issue
https://github.com/robertleeplummerjr/Leaflet.glify/pull/138
Until this pull request gets reviewed, I have a fork of the leafgl package with this fix implemented. This works on my system, although I forked it a while ago so can't guarantee it will be free from issues. Try removing the current leafgl package and run the following code.
install.pacakages("devtools")
devtools::install_github("RayLarone/leafgl")
Awesome. It works great for me. It seems to be a bit slower, but the performance is still good for several hundred thousand polygons.
Just out of interest: What exactly did you change and where? Did you move the origin of the map to the center of the displayed area?
That's good. Tbh, the performance difference really should be negligible. I may have added some other things to the fork which may be affecting performance, though I can't quite remember.
You can see the changes made and explanations in the pull request links above. Essentially, normalising some of the pixel coordinates around (0, 0) in the underlying library seems to fix the issue.
Thank you very much!
Hi, first of all I would like to thank you for the great libary, which significantly increases the performance of my maps.
Unfortunately, I have a small problem with the display of my polygons.
Map without LeafGL:
Map section with LeafGL:
The code I'm using looks like:
And when I'm using leafgl I just change it to "addGlPolygons" and use "leafglOutput" instead of my "leafletOutput".
Also, my highlightOptions don't work anymore when using addGlPolygons. Is there a way to make them work?
Thanks in advance!