你好,您可以通过设置图层里的zIndex参数来设置图层叠加顺序; 参考范例:
var worldLayer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest({
url: urlWorld
}),
projection: 'EPSG:4326',
zIndex:1
});
var jinJingLayer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest({
url: urlJinjing,
origin: [-180, 90],
transparent: true
}),
projection: 'EPSG:4326',
zIndex:0
});
map.addLayer(worldLayer);
map.addLayer(jinJingLayer);//最终显示结果:添加顺序为 0:jinJingLayer -> 1:worldLayer