|
|
@@ -26,6 +26,7 @@ |
|
|
|
<air-info :data="airDetail" /> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
v-show="problemPopupShow" |
|
|
|
id="problemOverlay" |
|
|
|
class="problem-overlay" |
|
|
|
> |
|
|
@@ -275,6 +276,7 @@ export default { |
|
|
|
airportFontStyle: { |
|
|
|
'color': '#1890FF' |
|
|
|
}, |
|
|
|
problemPopupShow: false, |
|
|
|
tabIndex: 1, |
|
|
|
page: ref(1), |
|
|
|
pageCount: 0, |
|
|
@@ -306,7 +308,12 @@ export default { |
|
|
|
url: 'https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=f634525a82da65f715d168d7ba1899c0' |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
var wmsSource = new Tile({ |
|
|
|
source: new TileWMS({ |
|
|
|
url: 'https://geoserver.t-aaron.com:4080/geoserver/jiangning/wms', |
|
|
|
params: { 'LAYERS': 'jiangning:town' } |
|
|
|
}) |
|
|
|
}) |
|
|
|
data.map = new Map({ |
|
|
|
// 地图容器 |
|
|
|
target: props.id, |
|
|
@@ -316,30 +323,8 @@ export default { |
|
|
|
maxZoom: 17 |
|
|
|
}), |
|
|
|
layers: [ |
|
|
|
tdtImgMap, |
|
|
|
new Tile({ |
|
|
|
source: new TileWMS({ |
|
|
|
url: 'https://geoserver.t-aaron.com:4080/geoserver/jiangning/wms', |
|
|
|
params: { 'LAYERS': 'jiangning:town' } |
|
|
|
}) |
|
|
|
}) |
|
|
|
// new TileLayer({ |
|
|
|
// source: new WMTS({ |
|
|
|
|
|
|
|
// url: 'https://geoserver.t-aaron.com:4080/geoserver/gwc/service/wmts', |
|
|
|
// matrixSet: 'EPSG:4326', |
|
|
|
// layer: 'jiangning-town', |
|
|
|
// format: 'image/png', |
|
|
|
// projection: projection, |
|
|
|
// tileGrid: new WMTSTileGrid({ |
|
|
|
// origin: getTopLeft(projectionExtent), |
|
|
|
// resolutions: resolutions, |
|
|
|
// matrixIds: matrixIds |
|
|
|
// }), |
|
|
|
// style: 'default', |
|
|
|
// wrapX: true |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
tdtImgMap |
|
|
|
|
|
|
|
], |
|
|
|
controls: control.defaults({ |
|
|
|
attribution: false, |
|
|
@@ -348,10 +333,8 @@ export default { |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
// WMTS资源对象 |
|
|
|
var wmtsSource = new WMTS({ |
|
|
|
url: '' |
|
|
|
}) |
|
|
|
data.map.addLayer(wmsSource) |
|
|
|
wmsSource.setOpacity(0.3) |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -480,7 +463,7 @@ export default { |
|
|
|
// console.log(data.problemDetail, '详情') |
|
|
|
const coord = feature.getProperties().coordinate |
|
|
|
data.problemOverlay.setPosition(coord) |
|
|
|
|
|
|
|
data.problemPopupShow = true |
|
|
|
data.map.addOverlay(data.problemOverlay) |
|
|
|
|
|
|
|
// data.problemOverlay.setPosition(coord) |
|
|
@@ -504,6 +487,7 @@ export default { |
|
|
|
const hideProblemInfo = () => { |
|
|
|
if (data.map.getOverlayById('problem_overlay')) { |
|
|
|
data.problemDetail = {} |
|
|
|
data.problemPopupShow = false |
|
|
|
data.map.removeOverlay(data.problemOverlay) |
|
|
|
} |
|
|
|
} |