| | |
| | | }, |
| | | |
| | | ], |
| | | }, |
| | | }, { |
| | | name: '本地服务', |
| | | sourceType: 'localmap', |
| | | id: 3, |
| | | isShow: true, |
| | | list: [ |
| | | { |
| | | name: "地图", |
| | | image: require("../../assets/img/imageLayer/gdmap_map.jpg"), |
| | | urls: "http://{host}/LFData/2d/tiles/vec/{z}/{x}/{y}.png", |
| | | }, |
| | | { |
| | | name: "影像", |
| | | image: require("../../assets/img/imageLayer/gdmap_image.jpg"), |
| | | urls: "http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png", |
| | | }, |
| | | |
| | | ], |
| | | } |
| | | |
| | | ], |
| | | }; |
| | |
| | | zIndex: -1 |
| | | }); |
| | | window.map.addLayer(window.olBaseMapLayer); |
| | | } else if (mapCollection.sourceType === "localmap") { |
| | | var ulr = map.urls; |
| | | ulr = ulr.replace("{host}", iisHost) |
| | | console.log(ulr) |
| | | window.BaseMapLayer = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: ulr, |
| | | maximumLevel: this.data.maximumLevel, |
| | | }) |
| | | ); |
| | | |
| | | window.olBaseMapLayer = new TileLayer({ |
| | | title: "高德地图", |
| | | source: new XYZ({ |
| | | url: ulr, |
| | | wrapX: false |
| | | }), |
| | | zIndex: -1 |
| | | }); |
| | | window.map.addLayer(window.olBaseMapLayer); |
| | | } |
| | | Viewer.imageryLayers.lowerToBottom(window.BaseMapLayer);//将图层移到最底层 |
| | | |
| | | Viewer.imageryLayers.raise(window.BaseMapLayer);//将图层上移一层 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 添加数据 |
| | | addData() { |
| | | if (this.data.urls && this.data.sourceType) { |