openlayers创建的矢量点图层被遮挡,设置zindex也没用,代码如下
var vectorSource = new VectorSource({
features: features,
wrapX: false
});
let pointStyle = new Style({
image: new Circle({
radius: 5,
fill: new Fill({
color: 'rgba(255, 0, 0, 0.5)'
}),
stroke: new Stroke({
color: 'red',
width: 1
})
}),
zIndex: 2000
});
var resultLayer = new VectorLayer({
title: '测试点',
source: vectorSource,
style: pointStyle,
zIndex: 2000
});
myol.getLayers().push(resultLayer);