nnnjjj123
2020-11-06 03b6e0e792e70c31ee54cd42dfb6fb4077dd7b81
地图
1 files modified
33 ■■■■■ changed files
jimu.js/MapManager.js 33 ●●●●● patch | view | raw | blame | history
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);