I have a vector layer with clustering in OL3.4:
cluster = new ol.layer.Vector({ source: new ol.source.Cluster({ distance: 20, source: some_geojson }), style: some_style,});I want to change the cluster 'distance' property, after some event, particularly:
map.getView().on('change:resolution',function(){ // change cluster distance here (and refresh it)}What is the best approach to do this?
أكثر...
cluster = new ol.layer.Vector({ source: new ol.source.Cluster({ distance: 20, source: some_geojson }), style: some_style,});I want to change the cluster 'distance' property, after some event, particularly:
map.getView().on('change:resolution',function(){ // change cluster distance here (and refresh it)}What is the best approach to do this?
أكثر...