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 am trying to make a shiny app where the user uses a slider input to create n leaflet maps. Then on these maps clickable polygons are displayed, when the user clicks on the polygon the polygon changes colour.
I had this working with leaflet and addPolygons but because I need 19000+ polygons on (up to) 99 maps, I've been trying to use leafgl and addGlPolygons.
At first the maps seem to work ok, but then they start to display weird behavior where polygons will change colour when they haven't been clicked.
When they are initially plotted they are blue, but when the app errors they are removed.
Then I also get this weird sad face with cross eyes in the top-left corner of the leaflet.
Hi @BrookeGibbons interesting use-case... I think you're hitting a browser imposed limit of how many webgl contexts are allowed to be drawn. IIRC for chrome this number is 16. You should see a warning in the browser console: "WARNING: Too many active WebGL contexts. Oldest context will be lost." @robertleeplummerjr is ther anything that Leaflet.glify can do to avoid hitting this limit? E.g. draw everything that is added to a map to the same webgl canvas? Is something like that even possible?
I am trying to make a shiny app where the user uses a slider input to create n leaflet maps. Then on these maps clickable polygons are displayed, when the user clicks on the polygon the polygon changes colour.
I had this working with leaflet and addPolygons but because I need 19000+ polygons on (up to) 99 maps, I've been trying to use leafgl and addGlPolygons.
At first the maps seem to work ok, but then they start to display weird behavior where polygons will change colour when they haven't been clicked.
When they are initially plotted they are blue, but when the app errors they are removed.
Then I also get this weird sad face with cross eyes in the top-left corner of the leaflet.
The text was updated successfully, but these errors were encountered: