From 03b6e0e792e70c31ee54cd42dfb6fb4077dd7b81 Mon Sep 17 00:00:00 2001
From: nnnjjj123 <494715143@qq.com>
Date: Fri, 06 Nov 2020 17:04:00 +0800
Subject: [PATCH] 地图

---
 jimu.js/MapManager.js |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/jimu.js/MapManager.js b/jimu.js/MapManager.js
index 6e1caba..7695844 100644
--- a/jimu.js/MapManager.js
+++ b/jimu.js/MapManager.js
@@ -154,6 +154,33 @@
                         else if (layerConfig.type == "wmts") {
                             layer = new Cesium.WebMapTileServiceImageryProvider(layerConfig);
                         }
+                        else if (layerConfig.type == "gg") {
+                            layer = DC.ImageryLayerFactory.createGoogleImageryLayer()
+                        }
+                        else if (layerConfig.type == "baidu") {
+                            layer = DC.ImageryLayerFactory.createBaiduImageryLayer()
+
+                        }
+                        else if (layerConfig.type == "gaod") {
+                            layer = DC.ImageryLayerFactory.createAmapImageryLayer()
+                        }
+                        else if (layerConfig.type == "tenx") {
+
+                            layer = DC.ImageryLayerFactory.createTencentImageryLayer()
+
+                        }
+                        else if (layerConfig.type == "gis") {
+                            layer = DC.ImageryLayerFactory.createArcGisImageryLayer({
+                                url:
+                                    'http://cache1.arcgisonline.cn/arcgis/rest/services/SimpleFeature/ChinaBoundaryLine/MapServer'
+                            })
+                        }
+                        else if (layerConfig.type == "mapbox") {
+                            layer = new Cesium.MapboxImageryProvider({
+                                mapId: 'mapbox.country-boundaries-v1',
+                                accessToken:'pk.eyJ1Ijoibm5uampqMTIzNDU2IiwiYSI6ImNraDV3YzJlYTFtdnEycmxxaXZpem1tM3cifQ.qaBhT3T_VTxXbeoRAVTkwg'
+                            })
+                        }
                         layerArr.push(layer);
                     }
 
@@ -316,9 +343,9 @@
                     //     });
                     // }), 100);
                     //无动画的
-                    setTimeout(lang.hitch(this,function(){
-                        this.map.camera.setView({destination:Cesium.Rectangle.fromDegrees(west, south, east, north)});
-                    }),100);
+                    setTimeout(lang.hitch(this, function () {
+                        this.map.camera.setView({ destination: Cesium.Rectangle.fromDegrees(west, south, east, north) });
+                    }), 100);
 
                     //修改全局的homebutton定位
                     Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(west, south, east, north);

--
Gitblit v1.9.3