【发布时间】:2016-02-20 15:12:56
【问题描述】:
在我的应用程序中,我有按以下顺序添加到图层的功能:
feature_1
feature_2
feature_3
但是我希望它们的 z 顺序是相反的,这样 feature_1 就会与其他功能重叠。我认为 Style 的 zIndex 属性应该有所帮助,但事实并非如此。我是这样设置的:
feature_1.setStyle(
new ol.style.Style({
...
zIndex: 999999
})
);
feature_2.setStyle(
new ol.style.Style({
...
zIndex: 111
})
);
feature_3.setStyle(
new ol.style.Style({
...
zIndex: 0
})
);
这并没有帮助。 Feature_3 仍然与其他功能重叠。
【问题讨论】:
-
不,他没有,但是他可以使用 display:flex 更改排序
-
看看this example,如果你可以使用多层。
-
我也有同样的问题...您找到解决方案了吗?