From 230a369823d5434b34ce2e07ff0fa70da5655835 Mon Sep 17 00:00:00 2001 From: viglino Date: Mon, 16 Sep 2024 16:35:18 +0200 Subject: [PATCH] [DOC] Style cluster selected feature #1101 --- examples/map/map.clustering.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/map/map.clustering.html b/examples/map/map.clustering.html index 956a6d83..765fae47 100644 --- a/examples/map/map.clustering.html +++ b/examples/map/map.clustering.html @@ -190,7 +190,7 @@

Select options:

source: clusterSource, animationDuration: $("#animatecluster").prop('checked') ? 700:0, // Cluster style - style: getStyle + style: getStyle, }); map.addLayer(clusterLayer); // add 2000 features @@ -205,6 +205,14 @@

Select options:

// Feature style when it springs apart featureStyle: featureStyle, selectCluster: false, // disable cluster selection + // Style the selection + style: function(f) { + var s = getStyle(f); + s[0] = s[0].clone(); + s[0].getImage().setScale(2) + s[0].setZIndex(1) + return s; + } }); map.addInteraction(selectCluster);