From 0a7a2b4071e9cd279462c5f565d709a92f25e101 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Sat, 08 Oct 2022 16:17:55 +0800
Subject: [PATCH] 首页影像数据和后台联动
---
src/components/map/index.vue | 82 ++++------------------------------------
1 files changed, 9 insertions(+), 73 deletions(-)
diff --git a/src/components/map/index.vue b/src/components/map/index.vue
index a6261a7..7d02b43 100644
--- a/src/components/map/index.vue
+++ b/src/components/map/index.vue
@@ -6,6 +6,7 @@
<script>
// import axios from 'axios'
import NCregion from '@/assets/region'
+import {viewdata} from '@/assets/viewdata'
// 图层变量做声明
var farmRegionLayer = null
@@ -108,79 +109,14 @@
})
)
- // http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer
-
- // arcgis服务添加
- global.viewer.imageryLayers.addImageryProvider(
- new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengyjjddom/MapServer/WMTS',
- // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS',
- layer: 'nanchengyjjddom',
- style: 'default',
- tileMatrixSetID: 'default028mm',
- format: 'image/png',
- tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
- maximumLevel: 19,
- tileMatrixLabels: [
- '0',
- '1',
- '2',
- '3',
- '4',
- '5',
- '6',
- '7',
- '8',
- '9',
- '10',
- '11',
- '12',
- '13',
- '14',
- '15',
- '16',
- '17',
- '18',
- '19'
- ]
- })
- )
-
- // arcgis服务添加
- global.viewer.imageryLayers.addImageryProvider(
- new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
- url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS',
- // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS',
- layer: 'nanchengdom',
- style: 'default',
- tileMatrixSetID: 'default028mm',
- format: 'image/png',
- tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(),
- maximumLevel: 19,
- tileMatrixLabels: [
- '0',
- '1',
- '2',
- '3',
- '4',
- '5',
- '6',
- '7',
- '8',
- '9',
- '10',
- '11',
- '12',
- '13',
- '14',
- '15',
- '16',
- '17',
- '18',
- '19'
- ]
- })
- )
+ viewdata.forEach(e=>{
+ global.viewer.imageryLayers.addImageryProvider(
+ new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+ url: e.selectItem.url,
+ maximumLevel: 18
+ })
+ )
+ })
// 矢量电子
// global.viewer.imageryLayers.addImageryProvider(
--
Gitblit v1.9.3