| | |
| | | MSET_DRAWALINELAYER({ state, commit, dispatch }, Str) { |
| | | //检查是否存在路线 |
| | | commit("removePolyline"); |
| | | let color = |
| | | global.DC.Namespace.Cesium.Color.fromCssColorString("#409EFF"); |
| | | let material = new global.DC.PolylineTrailMaterialProperty({ |
| | | color: color, |
| | | speed: 10, |
| | | }); |
| | | 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: material, |
| | | clampToGround: true, |
| | | }); |
| | | drawALineLayer.addOverlay(polyline); |
| | | state.drawALineLayer = drawALineLayer; |
| | | state.isOpenDrawALine = true; |
| | | commit("cameraSetView", state.navigationStartLngLat); //移动 |
| | | // commit("cameraSetView", state.navigationStartLngLat); //移动 |
| | | }, |
| | | }, |
| | | }; |