Skip to content

Commit 4c0b12a

Browse files
committed
scale the balloons depending on number of points
1 parent 63bcbc4 commit 4c0b12a

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

content/map/map.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,25 @@
126126
// get the year from the source's "year" property
127127
'icon-image': 'group-marker',
128128
'icon-anchor': 'bottom',
129-
'icon-size': 0.3,
129+
'icon-size': [
130+
'step',
131+
['get', 'point_count'],
132+
0.2,
133+
3,
134+
0.4,
135+
5,
136+
0.5
137+
],
130138
'text-field': ["step", ["zoom"], "", 1, ["get", "point_count"]],
131139
'text-font': [
132140
'Open Sans Semibold',
133141
'Arial Unicode MS Bold'
134142
],
135-
'text-offset': [0, -3],
136-
'text-anchor': 'top',
143+
'text-offset': [0, 1],
144+
'text-anchor': 'bottom',
145+
'text-allow-overlap': false,
146+
'text-optional': true,
147+
'icon-allow-overlap': true
137148

138149
}
139150
});

0 commit comments

Comments
 (0)