vue中使用OpenLayers(五):两层地图合并
html中需要用两个id接收jpg和png。png在jpg上面。地址和区域描边都在png上
<div id="themap" style="width: 100%;height: 100%;"></div>
<div style="width: 100%;height: 100%;position: absolute;width: 100%;height: 100%;top: 0;left: 0;" id="themap2"></div>
在js中
let view=new View({
center: fromLonLat([119.60753817138888, 30.49043631527778]),
projection: "EPSG:3857",
zoom: 8,
minZoom: 8,
})
this.map = new Map({
target: "themap",
view:view ,
layers: [
new TileLayer({
source: new XYZ({
url: "http://61.164.49.122:8092/googlemaps/satellite/{z}/{x}/{y}.jpg",
//url:'http://www.goo