![](/img/trans.png)
[英]The match in mapbox expression is an exact match,how to use fuzzy match in the expression
[英]How to use property within expression?
我的GeoJSON文件中有一个称为“ bla”的属性。
"text-field": [
'case',
['!=', ['get', 'bla'], null],
"{bla}%",
['==', ['get', 'bla'], null],
" ",
" ",
],
我想在案例表达式中显示该属性,但无法正常工作。
如果我简单地通过:
"text-field": "{bla}%"
它工作正常。
如何在该case表达式中使用属性?
谢谢
使用concat代替占位符:
"text-field": [
"case", ['!=', ['get', 'bla'], null],
["concat", ['get', 'bla'], '%'],
['==', ['get', 'bla'], null],
" ",
" "
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.