产品表达导致要素无法呈现 [英] Product expression causes features to not render
本文介绍了产品表达导致要素无法呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个具有线性特征的地图,这些特征的样式具有偏移量:
I have a map with linear features that have an offset in the style:
"line-offset": {
"stops": [ [ 12, 0 ], [ 16, 2 ] ]
},
If I try to substitute the value 2
with a product expression, the features fail to render.
"line-offset": {
"stops": [ [ 12, 0 ], [ 16, ["*", 2, 1] ] ]
},
javascript控制台中没有错误.
There is no error in the javascript console.
我正在使用最新版本的v0.49.0
.
I am using the latest version, v0.49.0
.
我正确使用了表达式吗?
Am I using the expression correctly?
推荐答案
To use expressions, you would need to change the syntax:
"line-offset": [
"interpolate",
[ "linear" ],
[ "zoom" ],
12, 0,
16, ["*", 2, 1],
]
这篇关于产品表达导致要素无法呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文