南昌市物联网技防平台-前端
shuishen
2021-04-21 b2168d65cb98b602555cfed68ee16739612794d1
地图模式添加预警图标
1 files modified
2 files added
26 ■■■■■ changed files
public/map/images/by-jingbao.png patch | view | raw | blame | history
public/map/images/yj-jingbao.png patch | view | raw | blame | history
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js 26 ●●●●● patch | view | raw | blame | history
public/map/images/by-jingbao.png
public/map/images/yj-jingbao.png
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
@@ -244,18 +244,20 @@
                that.indexs = index;
                var isclickD = true
                  , endx = null
                  , endy = null;
                var isclickD = true,
                  endx = null,
                  endy = null;
                layero[0].style.position = 'absolute';
                downs = document.onmousedown = () => {//鼠标按下事件
                  // console.log('down');//start
                  // downs = document.onmousedown = null;
                  var mx = window.event.clientX//鼠标初始位置
                    , my = window.event.clientY
                    , cx = this.offset[1].replace("px", "")//初始位置
                    , cy = this.offset[0].replace("px", "");
                    ,
                    my = window.event.clientY,
                    cx = this.offset[1].replace("px", "") //初始位置
                    ,
                    cy = this.offset[0].replace("px", "");
                  if (endx != null && endy != null) {
                    cx = endx;
                    cy = endy;
@@ -264,7 +266,8 @@
                    // console.log('move');//move
                    // console.log(this.offset)
                    var ux = window.event.clientX//记录实时位置
                      , uy = window.event.clientY;
                      ,
                      uy = window.event.clientY;
                    endx = +cx + (ux - mx)// 初始位置+(鼠标初始位置-实时位置)
                    endy = +cy + (uy - my);
                    layero[0].style.left = endx + 'px';
@@ -350,8 +353,7 @@
          mySelf.onceTimeMethod = setTimeout(() => {
            mySelf.onceTimeMethod = null;
          }, mySelf.onceTime);
        } else {
        };
        } else {};
@@ -835,12 +837,16 @@
      this.singles.push(single);
      delete single.graphic;
      var symbol;
      console.log(single.onlineStatus, '移动事件');
      if (single.jtype == 1) {
        symbol = new esri.symbol.PictureMarkerSymbol("./images/yj-jingbao.png", 40, 40);
      } else {
      if (single.onlineStatus == 1) {
        symbol = new esri.symbol.PictureMarkerSymbol("./images/zx-jingbao.png", 40, 40);
      } else {
        symbol = new esri.symbol.PictureMarkerSymbol("./images/dx-jingbao.png", 40, 40);
      }
      }
      var point = new Point(single[this.xPropertyName], single[this.yPropertyName], this.spatialRef);
      var attributes = lang.clone(single);
      var graphic = new Graphic(point, symbol, attributes, null);