From 66a7abeb8d4fd7cc96204bd98e5bc472f6bbd1bb Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Fri, 28 Apr 2023 14:36:12 +0800
Subject: [PATCH] 编辑范围修改
---
vue.config.js | 4 ++--
src/components/map/dcMap.vue | 39 ++++++++++++++++++++-------------------
2 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/src/components/map/dcMap.vue b/src/components/map/dcMap.vue
index 389f638..9871808 100644
--- a/src/components/map/dcMap.vue
+++ b/src/components/map/dcMap.vue
@@ -58,27 +58,27 @@
// })
// )
- // global.viewer.imageryLayers.addImageryProvider(
- // new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- // url: "http://10.141.11.11:80/slapi/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326",
- // layer: "wmts_4326_361100",
- // style: "default",
- // format: "image/png",
- // tileMatrixSetID: "c",
- // tileMatrixLabels: new Array(18).fill(0).map((v, i) => i + 1),
- // tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
- // })
- // )
-
global.viewer.imageryLayers.addImageryProvider(
- new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
- url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
- subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
- format: 'image/jpeg',
- show: true,
- maximumLevel: 18
+ new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+ url: "http://10.141.11.11:80/slapi/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326",
+ layer: "wmts_4326_361100",
+ style: "default",
+ format: "image/png",
+ tileMatrixSetID: "c",
+ tileMatrixLabels: new Array(18).fill(0).map((v, i) => i + 1),
+ tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
})
)
+
+ // global.viewer.imageryLayers.addImageryProvider(
+ // new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+ // url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
+ // subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
+ // format: 'image/jpeg',
+ // show: true,
+ // maximumLevel: 18
+ // })
+ // )
//添加图层
polygonLayer = new global.DC.VectorLayer('polygonLayer')
@@ -122,6 +122,7 @@
if (polygon) {
this.clearDraw()
}
+ this.coordinates = []
plotTool && plotTool.draw(type, overlay => {
if (overlay) {
polygonLayer.addOverlay(overlay)
@@ -153,7 +154,7 @@
},
//回显多边形
showPolygon (positions) {
- console.log('positions', positions)
+ console.log('showPolygon', positions)
let viewer = global.viewer
positions = positions.replaceAll(",", ";").replaceAll(" ", ",")
polygon = new global.DC.Polygon(positions)
diff --git a/vue.config.js b/vue.config.js
index fefff59..a6b11bf 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -39,8 +39,8 @@
proxy: {
'/api': {
//本地服务接口地址
- // target: 'http://localhost:82/',
- target: "http://192.168.0.100:82",
+ target: 'http://localhost:82/',
+ // target: "http://192.168.43.202:82",
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',
ws: true,
--
Gitblit v1.9.3