| | |
| | | //加载第一条线路 |
| | | that.$store.commit("set_choiceRouterS", 0); |
| | | that.$store.dispatch("MSET_DRAWALINELAYER", datas.Str); |
| | | that.$store.commit("cameraSetView", ints.start); |
| | | } |
| | | }, |
| | | }; |
| | |
| | | MSET_DRAWALINELAYER({ state, commit, dispatch }, Str) { |
| | | //检查是否存在路线 |
| | | commit("removePolyline"); |
| | | // let color = global.DC.Color.RED; |
| | | // let color = global.DC.Namespace.Cesium.Color.DEEPSKYBLUE; |
| | | let color = |
| | | global.DC.Namespace.Cesium.Color.fromCssColorString("#409EFF"); |
| | | // let color = { |
| | | // alpha: 1, |
| | | // blue: 0, |
| | | // green: 0, |
| | | // red: 1, |
| | | // }; |
| | | // color.blue = 0.25; |
| | | // color.green = 0.61; |
| | | // color.red = 1; |
| | | // console.log(color); |
| | | let drawALineLayer = new global.DC.VectorLayer("layer"); |
| | | state.mviewer.addLayer(drawALineLayer); |
| | | let polyline = new global.DC.Polyline(Str); //加入绘画点 |
| | | polyline.setStyle({ |
| | | width: 3, |
| | | material: DC.Color.RED, |
| | | material: color, |
| | | clampToGround: true, |
| | | }); |
| | | drawALineLayer.addOverlay(polyline); |
| | | state.drawALineLayer = drawALineLayer; |
| | | state.isOpenDrawALine = true; |
| | | commit("cameraSetView", state.navigationStartLngLat); //移动 |
| | | // commit("cameraSetView", state.navigationStartLngLat); //移动 |
| | | }, |
| | | }, |
| | | }; |