var layer = new ol.layer.Vector({
source: new ol.source.Vector({
projection: 'EPSG:4326',
format: new ol.format.GeoJSON()
}),
style: styleFunction,
zIndex:9999
});
在声明图层的时候,加一个zIndex就好了
效果图:(需求是要让那个透明图层在不透明图层上)
var layer = new ol.layer.Vector({
source: new ol.source.Vector({
projection: 'EPSG:4326',
format: new ol.format.GeoJSON()
}),
style: styleFunction,
zIndex:9999
});
在声明图层的时候,加一个zIndex就好了
效果图:(需求是要让那个透明图层在不透明图层上)