Skip to content

Commit d32bf42

Browse files
author
dapetri
committed
counter
1 parent ef15e98 commit d32bf42

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dafolio",
3-
"version": "0.2.10",
3+
"version": "0.2.11",
44
"private": true,
55
"dependencies": {
66
"@testing-library/jest-dom": "^5.16.5",

src/components/pages/Map.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,29 @@ export const Map = () => {
7171
"icon-size": 0.065,
7272
"icon-allow-overlap": true,
7373
"icon-anchor": "bottom",
74+
"text-field": [
75+
"case",
76+
[">", ["get", "count"], 1],
77+
["get", "count"],
78+
"",
79+
],
80+
"text-size": 12,
81+
"text-offset": [0, 1], // Adjust the offset to position the text to the right of the pin
82+
"text-anchor": "bottom",
83+
"text-allow-overlap": true,
84+
"text-ignore-placement": true,
85+
},
86+
paint: {
87+
"text-color": "#000000", // Adjust the color as needed
88+
"text-opacity": [
89+
"interpolate",
90+
["linear"],
91+
["zoom"],
92+
0,
93+
0,
94+
10,
95+
1,
96+
],
7497
},
7598
});
7699
} else {

0 commit comments

Comments
 (0)