| | |
| | | this.setModelChangeColor(colors); |
| | | }, |
| | | setModelChangeColor(res) { |
| | | const modelLayer = mapServer.listData.filter((res) => { |
| | | if (res.name == config.modelLayer) { |
| | | return res; |
| | | console.log('mapServer.listData',mapServer.listData,config.modelLayer); |
| | | const modelLayer = mapServer.listData.filter((obj) => { |
| | | if (obj.name == config.modelLayer) { |
| | | return obj; |
| | | } |
| | | }); |
| | | if (modelLayer.length <= 0) return; |
| | | earthCtrl.userScene.flyTo(modelLayer[0].layer); |
| | | modelLayer[0].layer.style = new Cesium.Cesium3DTileStyle({ |
| | | color: { |
| | | evaluateColor: (feature) => { |
| | | const id = feature.getProperty("id"); |
| | | console.log("id**********", id); |
| | | const color = res.filter((item) => { |
| | | if (item.ids.indexOf(id) > -1) { |
| | | return item; |
| | |
| | | return name; |
| | | }, |
| | | creatAroundPoi(res) { |
| | | let colors = []; |
| | | res.data.forEach((element) => { |
| | | colors.push({ |
| | | name: element.type, |
| | | color: element.color, |
| | | ids: element.list |
| | | }); |
| | | }) |
| | | console.log('colors----',colors); |
| | | store.state.setListColor = colors; |
| | | store.state.showLenged = true; |
| | | this.setModelChangeColor(colors); |
| | | }, |
| | | creatAroundPoi1111(res) { |
| | | const poi = res.data; |
| | | var std = []; |
| | | var feature = { |