From 4c0b12aa8e0c04434cbc1561888c2a80eecfe6a6 Mon Sep 17 00:00:00 2001 From: gluap Date: Sun, 19 May 2024 10:38:36 +0200 Subject: [PATCH] scale the balloons depending on number of points --- content/map/map.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/content/map/map.html b/content/map/map.html index a671283a..b3ff9370 100644 --- a/content/map/map.html +++ b/content/map/map.html @@ -126,14 +126,25 @@ // get the year from the source's "year" property 'icon-image': 'group-marker', 'icon-anchor': 'bottom', - 'icon-size': 0.3, + 'icon-size': [ + 'step', + ['get', 'point_count'], + 0.2, + 3, + 0.4, + 5, + 0.5 + ], 'text-field': ["step", ["zoom"], "", 1, ["get", "point_count"]], 'text-font': [ 'Open Sans Semibold', 'Arial Unicode MS Bold' ], - 'text-offset': [0, -3], - 'text-anchor': 'top', + 'text-offset': [0, 1], + 'text-anchor': 'bottom', + 'text-allow-overlap': false, + 'text-optional': true, + 'icon-allow-overlap': true } });