Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.98k stars 1k forks source link

Customizable group opacity in MarkerCluster.Spiderfier.js #632

Open oldrich-s opened 8 years ago

oldrich-s commented 8 years ago

I propose to make the group element opacity customizable instead of fixed value similar to leg options:

this.setOpacity(0.3);
nikitalpopov commented 5 years ago

Are there any workarounds to solve this? This doesn't work:

cluster.on('spiderfied', (event) => {
    event.cluster.options.opacity = 0;
});

cluster.on('unspiderfied', (event) => {
    event.cluster.options.opacity = 1;
});
alpanyukov commented 5 years ago
cluster.on('spiderfied', (event) => {
    event.cluster.setOpacity(0);
});

cluster.on('unspiderfied', (event) => {
    event.cluster.setOpacity(1);
});