leafgl icon indicating copy to clipboard operation
leafgl copied to clipboard

Polygons don't render (correctly)

Open wendywangwwt opened this issue 5 years ago • 1 comments

Hi,

Thanks for working on such an amazing package! I have a bunch of layers of data to render on county level so wanted to reduce the map loading time and came across this package.

I was checking out the demos and tried this one: https://github.com/r-spatial/leafgl/blob/master/experiments/alabama_glify.R

Everything works fine (I mean there was no error when I ran the code) but the polygons didn't show up on the map: Screen Shot 2020-04-17 at 18 03 25

I modified the 100k polygons on a map demo by using my shapefile, and got into a slightly different but probably related issue that the polygons don't show different rgb colors: Screen Shot 2020-04-17 at 18 08 06 I'm not sure what the rgb color should be so I tried both the original rgb colors (0~255) and the original values divided by 255. Both gave the same all green-ish color on the map.

Can you pleas suggest if I misused any of the configurations? Thank you!

wendywangwwt avatar Apr 17 '20 22:04 wendywangwwt

addGlPolygonsSrc as used in the alabama example is not actively maintained, so I'd advise to use addGlPolygons intead. I've tried yesterday and it works for me (only for a subset of the polygons though). I cannot comment on the second issue you're seeing. Maybe re-install the latest dev version and try again. I am changing things regularly these days.

tim-salabim avatar Apr 19 '20 07:04 tim-salabim