| | |
| | | var source = [] |
| | | const mapGeo = { |
| | | |
| | | source1: null, |
| | | init(res) { |
| | | switch (res.type) { |
| | | case "WangGe": |
| | |
| | | Viewer.dataSources.remove(Viewer.dataSources.getByName("zhaiHai1")[0]) |
| | | Viewer.dataSources.remove(Viewer.dataSources.getByName("zhaiHai3")[0]) |
| | | } else { |
| | | if (!res.type) return; |
| | | Viewer.dataSources.remove(Viewer.dataSources.getByName(res.type)[0]) |
| | | } |
| | | |
| | |
| | | }) |
| | | }, |
| | | addZhuangHaoGeoJson(res) { |
| | | |
| | | |
| | | var url = layerData.config.Model_URL + res.urls; |
| | | var img = layerData.config.Model_URL + '/Data/img/img1.png'; |
| | | var source1 = Cesium.GeoJsonDataSource.load(url) |
| | | source1.then((dataSource) => { |
| | | Cesium.GeoJsonDataSource.load(url).then((dataSource) => { |
| | | |
| | | dataSource.name = res.type |
| | | Viewer.dataSources.add( |
| | | dataSource |