I have posted a few related questions about this topic here here and here. I have tried to set the opacity of the layer, then reset it with setStyle on a zoom event like so:
Layer18 = L.geoJson(featureIcon, { style: function (feature){ return {opacity:0}; }, if (map.getZoom() === 14) { console.log("zoom14"); Layer18.setStyle({opacity:1}); ..but I am not sure if opacity can be set in this way with geoJSON point layers.
I have also tried to toggle the css of the svg icon as shown in one of the questions linked above, but this also does not work.
I am really puzzled that this seems to be so difficult. I tried toggling the opacity of the marker, but I am not sure ow to do that over a set of markers.
أكثر...
Layer18 = L.geoJson(featureIcon, { style: function (feature){ return {opacity:0}; }, if (map.getZoom() === 14) { console.log("zoom14"); Layer18.setStyle({opacity:1}); ..but I am not sure if opacity can be set in this way with geoJSON point layers.
I have also tried to toggle the css of the svg icon as shown in one of the questions linked above, but this also does not work.
I am really puzzled that this seems to be so difficult. I tried toggling the opacity of the marker, but I am not sure ow to do that over a set of markers.
أكثر...