francoisromain / leaflet-markers-canvas

A Leaflet plugin to render many markers in a canvas instead of the DOM
GNU Affero General Public License v3.0
44 stars 16 forks source link

Unable to hide show canvas-markers-layer #5

Open navilaufm opened 3 years ago

navilaufm commented 3 years ago

Hi,

Following documentation I see clear, and redraw, clear seems to clear the layer but cannot show it again or redraw.

I am trying to simulate an animation creating several canvas-markers layers lay1, lay2, lay3 etc from several points, each points represents events in a 10 minute period.

I am trying to the simulate a loop where shows events every 10 mins (example reports grouped every 10 mins). I am unable to loop and show certain layers and set opacity 0 to the others, I done with images and normal markers, but can relate here.

Even I added a Control Layer to have those lay1,lay2,lay3... in as a layer and let the control show hide but also does not works.

What is the approach... ? thanks Screenshot (10)

ERS-Long commented 2 years ago

i found a hack way to hide/show the canvas layer

[your layer]._canvas.style.display="none";

[your layer]._canvas.style.display="block";

Alberto-Amo-Marin commented 1 year ago

I am having the same problem as @navilaufm Could you solve that?