| | |
| | | <template> |
| | | |
| | | |
| | | <div class="map-layout"> |
| | | <Map @init="init" :option="option" v-if="option" /> |
| | | <Tab v-if="loaded" /> |
| | | <Tab v-if="loaded" :type='type' :colorMapList='colorMapList' @getList="testLoaded"/> |
| | | </div> |
| | | |
| | | |
| | |
| | | getCatesian3FromPX, |
| | | Cartesian3_to_WGS84, |
| | | } from '../../../../../components/Map/libs/Point'; |
| | | |
| | | import { getMap } from '@/api/fourColorMap' |
| | | export default { |
| | | name: 'App', |
| | | components: { |
| | |
| | | option: null, |
| | | heatLayer: null, |
| | | shineishiwai: true, |
| | | colorMapList:[], |
| | | type:2, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | |
| | | map.addModel({ |
| | | link: 'http://222.92.213.22:8006/b3dm130/tileset.json', |
| | | name: '130吨模型图', |
| | | name: '130万吨模型图', |
| | | modifyZ: -45, |
| | | callback: tileset => { |
| | | var boundingSphere = tileset.boundingSphere; |
| | | var cartographic = Cesium.Cartographic.fromCartesian( |
| | |
| | | testLoadedData() { |
| | | const map = global.map; |
| | | if (!map) return; |
| | | $.get('./public/data/plots_namisuo.geojson', res => { |
| | | map.loadGeoJSON(res); |
| | | }); |
| | | let params = {} |
| | | params['eType'] = 2 |
| | | getMap(params).then(res => { |
| | | debugger |
| | | this.colorMapList = JSON.parse(JSON.stringify(res.data.result)) |
| | | const list = this.colorMapList.map(item => { |
| | | return { |
| | | type: item.type, |
| | | geometry: JSON.parse(item.geometry), |
| | | properties: JSON.parse(item.properties) |
| | | } |
| | | }) |
| | | const fourMapList = { |
| | | "type": "FeatureCollection", |
| | | "features": JSON.parse(JSON.stringify(list)) |
| | | } |
| | | map.loadGeoJSON(fourMapList) |
| | | }) |
| | | }, |
| | | testLoaded() { |
| | | const map = global.map; |
| | | if (!map) return; |
| | | let params = {} |
| | | params['eType'] = 2 |
| | | getMap(params).then(res => { |
| | | this.colorMapList = JSON.parse(JSON.stringify(res.data.result)) |
| | | }) |
| | | // $.get('./public/data/plots_namisuo.geojson', res => { |
| | | // map.loadGeoJSON(res); |
| | | // }); |
| | | }, |
| | | initEvent(map) { |
| | | let popup = null; |