+
liuyg
2022-01-10 1e546153c0d18497bb27889e47237d7466902db1
src/store/modules/mobile.js
@@ -720,26 +720,18 @@
    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 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: color,
        material: material,
        clampToGround: true,
      });
      drawALineLayer.addOverlay(polyline);