解决四川和台湾无法填充背景色的问题

This commit is contained in:
wangxk 2025-07-29 18:00:16 +08:00
parent 3f6ed98bbb
commit 17bf8a98df
2 changed files with 1 additions and 300 deletions

View File

@ -27203,10 +27203,6 @@
"coordinates": [ "coordinates": [
[ [
[ [
[
105.720292,
30.252662
],
[ [
105.720292, 105.720292,
30.252662 30.252662
@ -29156,115 +29152,8 @@
30.252662 30.252662
] ]
] ]
],
[
[
[
106.262935,
30.211306
],
[
106.256776,
30.19631
],
[
106.260471,
30.204067
],
[
106.261703,
30.205101
],
[
106.262935,
30.211306
]
]
],
[
[
[
105.571235,
30.17976
],
[
105.56138,
30.183898
],
[
105.558916,
30.18545
],
[
105.56138,
30.188035
],
[
105.571235,
30.17976
]
]
],
[
[
[
106.981736,
30.085062
],
[
106.980504,
30.085062
],
[
106.980504,
30.087651
],
[
106.981736,
30.085062
]
]
],
[
[
[
106.980504,
30.085062
],
[
106.976193,
30.083509
],
[
106.978041,
30.087133
],
[
106.980504,
30.085062
]
]
],
[
[
[
106.976193,
30.083509
],
[
106.974345,
30.082992
],
[
106.976193,
30.087651
],
[
106.976193,
30.083509
]
]
] ]
] ]
} }
}, },
@ -43549,190 +43438,6 @@
22.441042 22.441042
] ]
] ]
],
[
[
[
119.646064,
23.55084
],
[
119.609108,
23.503661
],
[
119.566608,
23.584842
],
[
119.678093,
23.600195
],
[
119.646064,
23.55084
]
]
],
[
[
[
123.491374,
25.747089
],
[
123.496917,
25.739005
],
[
123.495069,
25.737927
],
[
123.494453,
25.737927
],
[
123.492606,
25.737388
],
[
123.480903,
25.737927
],
[
123.480287,
25.737388
],
[
123.46612,
25.732537
],
[
123.465504,
25.732537
],
[
123.491374,
25.747089
]
]
],
[
[
[
123.549272,
25.724991
],
[
123.549272,
25.724991
],
[
123.546192,
25.729303
],
[
123.546192,
25.728764
],
[
123.549272,
25.724991
]
]
],
[
[
[
123.690322,
25.923187
],
[
123.691554,
25.921572
],
[
123.690938,
25.917267
],
[
123.690938,
25.916729
],
[
123.690322,
25.923187
]
]
],
[
[
[
123.559743,
25.718523
],
[
123.559743,
25.717984
],
[
123.548656,
25.720679
],
[
123.549272,
25.720679
],
[
123.559743,
25.718523
]
]
],
[
[
[
121.510513,
22.087215
],
[
121.573339,
22.086106
],
[
121.594281,
21.995152
],
[
121.510513,
22.087215
]
]
],
[
[
[
123.559743,
25.718523
],
[
123.560359,
25.718523
],
[
123.560359,
25.717984
],
[
123.559743,
25.717984
],
[
123.559743,
25.718523
]
]
] ]
] ]
} }

View File

@ -144,10 +144,6 @@ const renderChinaProvinces = (projection) => {
.attr('class', 'province-path') .attr('class', 'province-path')
.attr('d', pathGenerator) .attr('d', pathGenerator)
.attr('fill', d => { .attr('fill', d => {
//
if (d.properties.name === '四川省' || d.properties.name === "台湾省") {
return 'none'
}
return '#e7e7e7' return '#e7e7e7'
}) })
.attr('stroke', '#000') .attr('stroke', '#000')