南昌市物联网技防平台-前端
shuishen
2021-03-25 b305a75f4fc8c270886e018bb2228f8796780eab
public/map/widgets/alertSecurity/AlertSecurity.js
@@ -202,14 +202,10 @@
      var lgtd = that.getQueryStringByKey('jd');
      var lttd = that.getQueryStringByKey('wd');
      $.ajax({
        url: "https://web.byisf.com/api/blade-jfpts/jingdan/jingdan/detail?id=" + openid,
        type: 'get',
        dataType: 'JSON',
        success: function (data) {
          that.addPoint(that.addEntitys, data.data.jd, data.data.wd, './images/jingbaored.png')
        }
      })
      console.log(openid, lgtd, lttd, 123465)
      that.addPoint(that.addEntitys, lgtd, lttd, './images/jingbaored.png');
      $.ajax({
        url: "https://web.byisf.com/api/blade-jfpts/position/position/selectfj",
@@ -222,7 +218,7 @@
        success: function (data) {
          console.log(data)
          data.data.forEach(item => {
            that.addPoint(that.addEntitys, item.jd, item.wd, './images/security.png')
            that.addPoints(that.addEntitys, item.jd, item.wd, './images/security.png')
          })
        }
      })
@@ -283,6 +279,15 @@
    },
    addPoint: function (entitys, lgtd, lttd, img) {
      var symbol = new esri.symbol.PictureMarkerSymbol(img, 22, 32);
      var pt = new Point(lgtd, lttd, new SpatialReference({
        wkid: 4326
      }));
      var graphic = new esri.Graphic(pt, symbol);
      entitys.add(graphic);
    },
    addPoints: function (entitys, lgtd, lttd, img) {
      var symbol = new esri.symbol.PictureMarkerSymbol(img, 20, 20);
      var pt = new Point(lgtd, lttd, new SpatialReference({
        wkid: 4326