|
|
@@ -276,6 +276,21 @@ export default { |
|
|
|
}) |
|
|
|
data.map.addLayer(wmsSource) |
|
|
|
wmsSource.setOpacity(0.3) |
|
|
|
// 机场信息覆盖物 |
|
|
|
data.airOverlay = new Overlay({ |
|
|
|
id: 'air_overlay', |
|
|
|
element: document.getElementById('airOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
data.airportPopupShow = true |
|
|
|
|
|
|
|
data.problemOverlay = new Overlay({ |
|
|
|
id: 'problem_overlay', |
|
|
|
element: document.getElementById('problemOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -363,21 +378,6 @@ export default { |
|
|
|
}) |
|
|
|
data.map.addLayer(data.airLayer) |
|
|
|
|
|
|
|
// 机场信息覆盖物 |
|
|
|
data.airOverlay = new Overlay({ |
|
|
|
id: 'air_overlay', |
|
|
|
element: document.getElementById('airOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
data.airportPopupShow = true |
|
|
|
|
|
|
|
data.problemOverlay = new Overlay({ |
|
|
|
id: 'problem_overlay', |
|
|
|
element: document.getElementById('problemOverlay'), |
|
|
|
// autoPan: true, |
|
|
|
offset: [10, 10] |
|
|
|
}) |
|
|
|
// 点击事件 |
|
|
|
data.map.on('click', (evt) => { |
|
|
|
showAirInfo(evt) |