|
|
@@ -18,6 +18,7 @@
|
|
|
<el-input
|
|
|
v-if="typeValue != 6"
|
|
|
v-model="inputAddress"
|
|
|
+ :disabled="typeValue == 0 ? true : false"
|
|
|
style="max-width: 200px; height: 32px; margin: 0px 10px; background: black"
|
|
|
placeholder="输入URL地址……"
|
|
|
/>
|
|
|
@@ -74,9 +75,13 @@ export default {
|
|
|
infoDialogShow: false,
|
|
|
nowPoint: null,
|
|
|
nowPointInfo: null,
|
|
|
- typeValue: "1",
|
|
|
+ typeValue: "0",
|
|
|
inputAddress: "http://121.43.55.7:8889/geoserver/kdyjs/wms",
|
|
|
options: [
|
|
|
+ {
|
|
|
+ value: "0",
|
|
|
+ label: "默认",
|
|
|
+ },
|
|
|
{
|
|
|
value: "1",
|
|
|
label: "栅格WMS服务",
|
|
|
@@ -377,10 +382,31 @@ export default {
|
|
|
viewer.zoomTo(tile1);
|
|
|
});
|
|
|
},
|
|
|
+ addDEFLayer(){
|
|
|
+ // 添加地图服务
|
|
|
+ let layer = viewer.imageryLayers.addImageryProvider(this.getImageryProvider());
|
|
|
+ this.wmslayer.mapItemLayer = layer;
|
|
|
+ },
|
|
|
+ getImageryProvider(){
|
|
|
+ // console.log("互联网========="+serverType);
|
|
|
+ if(serverType == "互联网"){
|
|
|
+ return new SkyScenery.ArcGisMapServerImageryProvider({
|
|
|
+ url: systemConfig.wgn.layerUrl + SkySceneryConfig.token,
|
|
|
+ enablePickFeatures: false, // 禁用要素拾取功能以提高性能
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ return new SkyScenery.CGCS2000ArcGisMapServerImageryProvider({
|
|
|
+ url: systemConfig.wgn.layerUrl + SkySceneryConfig.token,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
changType() {
|
|
|
let that = this;
|
|
|
// this.inputAddress = '';
|
|
|
- if (that.typeValue == 1) {
|
|
|
+ if (that.typeValue == 0) {
|
|
|
+ let curUrl = systemConfig.wgn.layerUrl + SkySceneryConfig.token;
|
|
|
+ that.inputAddress = curUrl;
|
|
|
+ } else if (that.typeValue == 1) {
|
|
|
let curUrl = "http://121.43.55.7:8889/geoserver/kdyjs/wms";
|
|
|
that.inputAddress = curUrl;
|
|
|
} else if (that.typeValue == 2) {
|
|
|
@@ -414,7 +440,12 @@ export default {
|
|
|
// typeValue:'1',
|
|
|
// inputAddress:'',
|
|
|
|
|
|
- if (that.typeValue == 1) {
|
|
|
+ if (that.typeValue == 0) {
|
|
|
+ let curUrl = that.inputAddress;
|
|
|
+ // that.inputAddress = curUrl;
|
|
|
+ let param = { url: curUrl, layers: "defLayer" };
|
|
|
+ that.addDEFLayer(param);
|
|
|
+ } else if (that.typeValue == 1) {
|
|
|
let curUrl = that.inputAddress;
|
|
|
// let curUrl = 'http://121.43.55.7:8889/geoserver/kdyjs/wms';
|
|
|
// that.inputAddress = curUrl;
|