-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [BUG] 行政区划图 Choropleth 使用 update方法 更新 label.style.textAllowOverlap 不生效 #343
Comments
update 变量勿使用引用更新,参考 map.update({
label: {
visible: true,
field: "name",
style: {
fill: "#000",
opacity: 0.8,
fontSize: 11,
fontWeight: "normal",
fontFamily: "PingFang SC",
// spacing: 4,
stroke: "#fff",
strokeWidth: 1.5,
textAllowOverlap: flag,
padding: [5, 5],
},
},
}); |
有点不太明白,不能赋给他一个变量吗,要给他一个具体的值? |
使用这种方式也只有前两次能修改,再点击就失效了 |
Immutability 了解一下 |
需要直接用 L7 复现一下,再确认一下 |
|
用同样的方式去修改字体大小等属性没有问题,textallowoverlap就不行 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
新建Choropleth 图层;
动态切换label.style.textAllowOverlap 的值;
调用update方法 不生效;
线上复现demo:
demo
The text was updated successfully, but these errors were encountered: