I have some features on the map displayed as icons. I want to decide which icons should be hidden and which should be displayed when they collide on a numeric field, that each feature on my map has (see picture). I've found a mapbox property called "symbol-sort-key", but I can't figure out if it's the right thing. symbol-sort-key takes a number, but I don't know to what this number should refer to. Any ideas how to solve this problem?
Yes, symbol-sort-key
可能就是你想要的。它用于确定符号的绘制顺序,如果符号重叠且允许碰撞(数字最高获胜),则会影响在顶部绘制哪个符号;如果不允许碰撞,则影响唯一绘制的符号(数字最低获胜) 。
The number
文档中指的是数字类型。因此,如果您有一个名为“priority”的数字属性,您可以指定如下内容:
"symbol-sort-key": ["to-number", ["get", "priority"]],
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)