{"version":3,"file":"OverLayers.mjs","sources":["../../../../../../packages/sdk/plugins/Draw/OverLayers.ts"],"sourcesContent":["import L from 'leaflet'\nimport { CanvasShipUtils } from '@map-sdk/sdk/utils/CanvasShipUtils'\nimport { CommUtils } from '@map-sdk/sdk/utils/CommUtils'\nimport type { MyMap } from '@map-sdk/sdk/ShipxyAPISDK'\nimport type { Layer, Marker } from 'leaflet'\nclass OverLayers {\n  map: MyMap\n  options = {\n    shape: 'Polygon', //指定绘制类型\n    templineStyle: {\n      color: 'red',\n      dashArray: [5, 5],\n    },\n    hintlineStyle: {\n      color: 'red',\n      dashArray: [5, 5],\n    },\n    markerStyle: {\n      //mark 样式\n      draggable: true,\n    },\n    pathOptions: {\n      //line,pology 有效\n      dash: true,\n      dashArray: [5, 5],\n    },\n    draggable: true,\n    snappable: false,\n  }\n\n  // 长方形正方形\n  Rectange = {\n    options: {\n      shape: 'Rectangle', //指定绘制类型\n      templineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      hintlineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      pathOptions: {\n        color: 'rgba(255,0,0)',\n        fillColor: 'rgba(255,0,0)',\n        fillOpacity: 0.2,\n        dashArray: [5, 5],\n        weight: 1,\n      },\n    },\n  }\n  // 多边形\n  Polygon = {\n    options: {\n      shape: 'Polygon', //指定绘制类型\n      templineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      hintlineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      pathOptions: {\n        color: 'rgba(255,0,0)',\n        fillColor: 'rgba(255,0,0)',\n        fillOpacity: 0.2,\n        dashArray: [5, 5],\n        weight: 1,\n      },\n    },\n  }\n  Circle = {\n    options: {\n      shape: 'Circle', //指定绘制类型\n      //实线\n      templineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      //虚线\n      hintlineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      //绘制完成后\n      pathOptions: {\n        color: 'red',\n        fillColor: 'red',\n        fillOpacity: 0.2,\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      radius: 0,\n    },\n  }\n  Sector = {\n    options: {\n      // 中心点坐标\n      radius: 60, // 半径，单位米\n      startAngle: -45, // 起始角度，以度为单位，从北方开始逆时针计算\n      stopAngle: 45, // 结束角度\n      fillColor: '#ff7800', // 填充颜色\n      fillOpacity: 0.5, // 填充透明度\n      stroke: true,\n      color: '#000', // 边缘颜色\n      dashArray: [],\n      weight: 3,\n      opacity: 1,\n      clickable: true,\n      draggable: false, // 是否可拖动，默认为false\n      keyboard: true,\n      zIndexOffset: 1000,\n    },\n  }\n\n  FreeDraw = {\n    options: {\n      shape: 'FreeDraw', //指定绘制类型\n      templineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      hintlineStyle: {\n        color: 'red',\n        dashArray: [5, 5],\n        weight: 1,\n      },\n      pathOptions: {\n        color: 'rgba(255,0,0)',\n        fillColor: 'rgba(255,0,0)',\n        fillOpacity: 0.2,\n        dashArray: [5, 5],\n        weight: 1,\n      },\n    },\n  }\n  //是否回调经纬度坐标窗口\n  callbackWin = 1\n  temp_areaID = 'Temp_elane_area_001'\n  //绘制实例存储\n  _drawInstance: any = null\n  //绘制数据绘制层\n  layerHash = {}\n  //绘制绘制层名称描述\n  layerHashName: Record<string, any> = {}\n\n  _zoomend = false\n  _tempAreaArray: any[] = []\n  hashData = []\n  drawMarker: Record<string, Marker> = {}\n  constructor(map: MyMap, options?: any) {\n    this.map = map\n    if (options) {\n      this.options = options\n    }\n    this.init()\n  }\n  init() {\n    // this.list();\n    this.onLayerChange()\n    this.polyNameChange()\n    //tips:此处事件可能对后续其他绘制有影响（Aalon）\n    //多边形绘制完成触发事件\n    this.map.on('pm:create', (eg) => {\n      if (eg.shape != 'Marker') {\n        const ly = eg.layer as any\n\n        ly && (this._drawInstance = ly)\n\n        this._showInputArea()\n\n        ly && (this.layerHash[this.temp_areaID] = ly)\n        //开启编辑\n        ly && this.map.Draw.edit(ly)\n\n        //此处绘制样式调整因源码不支持扩展 eg:L.circle(t, { radius: n }).addTo(this._map)\n        //强制处理 aalon\n        if (eg.shape == 'Circle') {\n          ly &&\n            ly.setStyle(\n              Object.assign(\n                { color: 'red', weight: 1 },\n                {\n                  color: 'red',\n                  fillColor: 'red',\n                  fillOpacity: 0.2,\n                  dashArray: [5, 5],\n                  weight: 1,\n                }\n              )\n            )\n        }\n\n        this._layerChange()\n        //调整地图显示层级\n        this.map &&\n          this.map.shipsService &&\n          this.map.shipsService.setZIndex(300)\n      }\n    })\n    //绘制事件\n    this.map.on('pm:drawstart', (eg) => {\n      const layer = eg.workingLayer\n      //only for polines&&polgons\n      layer.on('pm:vertexadded', () => {\n        this._showInputArea()\n      })\n    })\n    // $('body').append(\"<span id='messureLength' style='display:none;'></sapn>\")\n  }\n\n  //与录入框交互\n  _showInputArea() {\n    const layer = this.getLayer()\n    if (layer) {\n      const latlngs = layer.getLatLngs ? layer.getLatLngs() : layer.getLatLng()\n      console.log(latlngs, '录入文本框内容')\n    }\n    // var e = this\n    // var type = $('.area_way .on').attr('data-type')\n    // type && $('#shape_point').length && e[type].inputArea('shape_point')\n    //自定义锚地提醒的圈 alpha 20210329\n    //if ($(\"#\" + layer.getlayerid('_shipWarnShow')).css('display')!=\"none\") {\n    //    e['Circle'].inputArea('distance');\n    //}\n  }\n\n  _layerChange() {\n    if (this._drawInstance) {\n      //拖动事件\n      this._drawInstance.on('pm:drag', () => {\n        this.callbackWin = 1\n        this._showInputArea()\n      })\n      //拖动添加点\n      this._drawInstance.on('pm:vertexadded', () => {\n        this.callbackWin = 1\n        this._showInputArea()\n      })\n      //拖动移除点\n      this._drawInstance.on('pm:vertexremoved', () => {\n        this.callbackWin = 1\n        this._showInputArea()\n      })\n      //marker 拖动\n      this._drawInstance.on('pm:markerdragend', () => {\n        this.callbackWin = 1\n        this._showInputArea()\n      })\n      // //ciccle _outerMarker move ：Aalon【2020-01-16 10:44】\n      this._drawInstance.pm._outerMarker &&\n        this._drawInstance.pm._outerMarker.on('move', () => {\n          this.callbackWin = 1\n          this._showInputArea()\n          //离锚圈\n          // elane.AlphaCIrcle._showInputArea()\n        })\n      this._drawInstance.on('pm:markerdragstart', () => {\n        this.callbackWin = 1\n        this._showInputArea()\n        //离锚圈\n        // elane.AlphaCIrcle._showInputArea()\n      })\n    }\n  }\n\n  //监听layer变动事件事件:[]\n  onLayerChange() {\n    //e.lyinterval && clearInterval(e.lyinterval)\n    //e.lyinterval = setInterval(()=> {\n    //    var type = $(\".area_way .on\").attr(\"data-type\")\n    //    if (elane.overLayers._drawInstance\n    //    && type\n    //    && $('#shape_point').length) {\n    //        var ly = elane.overLayers.getLayer();\n    //        //数据有效 且区域不等执行 保存\n    //        try {\n    //            if (elane.overLayers.historyLy) {\n    //                if (ly.getBounds\n    //                && elane.overLayers.historyLy.getBounds\n    //                && (!(ly.getBounds().equals(elane.overLayers.historyLy.getBounds())))) {\n    //                    elane.overLayers.historyLy = L.extend({}, ly);\n    //                    elane.overLayers[type].inputArea('shape_point')\n    //                }\n    //            } else {\n    //                elane.overLayers.historyLy = L.polygon([[90, -180], [90, 180], [-90, -180], [-90, 180]]);\n    //                elane.overLayers[type].inputArea('shape_point');\n    //            }\n    //        } catch (e) {\n    //        }\n    //    }\n    //}, 500);\n  }\n\n  //  区域名称绘制逻辑\n  //  1:当前可视范围内区域名称重绘\n  //  2:处于编辑的区域屏蔽展示\n  //  3:事件调整 缩放执行延迟添加\n  ///\n  polyNameChange() {\n    this.map.on('zoomend', () => {\n      this._zoomend = !0\n    })\n    this.map.on('moveend', () => {\n      const id = CommUtils.getUuid(12) //$('#_addAreaBox').attr('data-areaid')\n      this._tempAreaArray = []\n      for (const item in this.layerHashName) {\n        const ly = this.layerHashName[item]\n        ly && this.map.removeLayer(ly)\n        const d = this.hashData[item]\n        if (this.layerHash[item]) {\n          this.layerHash[item] && this.layerHash[item].redraw()\n          const lbounds = this.layerHash[item].getBounds()\n          if (lbounds.isValid()) {\n            if (this.map.getBounds().intersects(lbounds)) {\n              this.layerHashName[item] = this.showName(\n                this.layerHash[item],\n                d ? d.AreaName : ''\n              )\n              //编辑区域时临时移除区域名称显示\n              if (!(window['addArea'] && id == item))\n                if (!this._zoomend)\n                  //缩放延迟执行添加\n                  this.layerHashName[item] &&\n                    this.map.addLayer(this.layerHashName[item])\n                else {\n                  this._tempAreaArray.push(this.layerHashName[item])\n                }\n            }\n          }\n        }\n      }\n      //延迟绘制\n      setTimeout(() => {\n        //e.layerHashName[item] && this.map.addLayer(e.layerHashName[item])\n        this._tempAreaArray.forEach((item) => {\n          item && this.map.addLayer(item)\n        })\n      }, 0)\n      this._zoomend = !1\n\n      // 将船层置,如果没有测试轨迹打开着，这里将船置顶\n      // if (!$('#Math').hasClass('math_on')) {\n      this.map && this.map.shipsService && this.map.shipsService.restoreZIndex()\n      // }\n    })\n  }\n\n  showName(p: Layer, name = '') {\n    const color = this.map.mapType != 'MT_SATELLITE' ? '#333' : '#fff'\n    return CommUtils.getFeatureLabel(p, name, {\n      attributes: {\n        fill: color,\n        xShift: 0,\n        offset: 0,\n      },\n    } as any)\n  }\n\n  initDraw(type: string) {\n    //开始绘制\n    this.options.shape = type\n    this.start(this[type] ? this[type].options : this.options)\n  }\n  //移除绘制层\n  remove(id: string) {\n    const ly = this.layerHash[id],\n      lyName = this.layerHashName[id]\n    if (ly) {\n      try {\n        lyName && this.map.removeLayer(lyName)\n        this.map && this.map.Draw && this.map.Draw.remove(ly)\n      } catch {}\n      delete this.layerHash[id]\n    }\n  }\n\n  //移除所有层\n  clear() {\n    const layers = this.layerHash\n    if (layers) {\n      for (const i in layers) {\n        //临时绘制不清空\n        !i.includes('Temp_elane') && this.remove(i)\n      }\n    }\n  }\n\n  //统一绘制开始\n  start(opts: any) {\n    //移除标注\n    // elane.mark.markRemove();\n\n    //获取绘制属性\n    this.setOpts(opts)\n    //清除绘制对象实例\n    this.end()\n    //开始绘制\n    this._drawInstance =\n      this.map && this.map.Draw && this.map.Draw.begin(this.options)\n  }\n  //结束绘制\n  end(areaid?: undefined) {\n    //如果存在先结束绘制\n    if (this._drawInstance && !areaid) {\n      try {\n        this.map.Draw.end(this._drawInstance)\n        //移除\n        this.removeInstanceLayer()\n      } catch (ex) {\n        console.log(`The Draw Instache end Error:${ex}`)\n        //移除\n        this.removeInstanceLayer()\n        return\n      }\n    }\n  }\n  //结束编辑\n  endEdit(id: string) {\n    //如果编辑则取消当前编辑\n    id && this.layerHash[id] && this.map.Draw.cancelEdit(this.layerHash[id])\n    id && this.hashData[id] && !this.hashData[id].IsShow && this.remove(id)\n  }\n\n  //清除绘制层\n  removeInstanceLayer() {\n    let l\n    if (this._drawInstance) {\n      try {\n        //获取清除并层\n        l = this.map.Draw.getLayer(this._drawInstance)\n        l && this.map.Draw.remove(l)\n        this._drawInstance = null\n      } catch (e) {\n        console.log(`The Draw Instache remove Error:${e}`)\n      }\n    }\n  }\n  //设置绘制属性\n  setOpts(ops: any) {\n    L.extend(this.options, ops)\n  }\n  //获取绘制层\n  getLayer() {\n    let l\n    if (this._drawInstance) {\n      try {\n        //获取清除并层\n        l = this.map.Draw.getLayer(this._drawInstance)\n      } catch {}\n    }\n    return l\n  }\n\n  //显示多边形\n  showArea(\n    d: {\n      Points: any\n      AreaID: string\n      AreaStyle: string\n      AreaShape: number\n      Radius: number\n      AreaName: string | undefined\n    },\n    locate: boolean\n  ) {\n    //展示已绘制对象\n    let latLngs = []\n    const _lats = d.Points.split(',')\n    for (let k = 0; k < _lats.length - 1; k = k + 2) {\n      try {\n        const p = CanvasShipUtils.GPSEncryptByMapToLatLng(\n          L.latLng(\n            Number.parseFloat(_lats[k + 1]),\n            Number.parseFloat(_lats[k])\n          ),\n          this.map\n        )\n        latLngs.push(p.wrap())\n      } catch (e) {\n        console.log(`data is not available:${e}`)\n      }\n    }\n    latLngs = CanvasShipUtils.latlngsFrom180(latLngs)\n    this.layerHash[d.AreaID] && this.remove(d.AreaID)\n    //测试去掉\n    ///（0-矩形，1-不规则，2-圆）\n    let pathOptions = (d.AreaStyle && JSON.parse(d.AreaStyle)) || {}\n    pathOptions['dashArray'] = [5, 5] //强制把实实线改为虚线（纠正历史数据）\n    if (d.AreaShape == 0 || d.AreaShape == 1) {\n      pathOptions = Object.assign(\n        {\n          color: '#e41120',\n          weight: 1,\n          fillColor: 'none',\n          fillOpacity: 0,\n        },\n        pathOptions\n      )\n      this.layerHash[d.AreaID] = this.map.Draw.show(latLngs, {\n        shape: 'Polygon',\n        locate,\n        pathOptions,\n      })\n    } else if (d.AreaShape == 2) {\n      pathOptions = Object.assign(\n        {\n          color: '#e41120',\n          weight: 1,\n          fillColor: 'none',\n          fillOpacity: 0,\n          radius: d.Radius * 1852,\n        },\n        pathOptions\n      )\n      this.layerHash[d.AreaID] = this.map.Draw.show(latLngs, {\n        shape: 'Circle',\n        locate,\n        pathOptions,\n      })\n    }\n    //绑定区域名称\n    if (d.AreaName) {\n      this.layerHashName[d.AreaID] = this.showName(\n        this.layerHash[d.AreaID],\n        d.AreaName\n      )\n      this.layerHashName[d.AreaID] &&\n        this.map.addLayer(this.layerHashName[d.AreaID])\n    }\n  }\n\n  /**\n   * 清除绘制的marker\n   */\n  drawMarkClear() {\n    const objIDS = Object.keys(this.drawMarker)\n    for (const objID of objIDS) {\n      const _layer = this.drawMarker[objID]\n      if (_layer) {\n        this.map.removeLayer(_layer)\n      }\n    }\n  }\n\n  /**\n   * 显示marker\n   * @param item\n   * @param locate 是否定位\n   */\n  showMarker(\n    item: {\n      MarkerType: string\n      Lat: number\n      Lon: number\n      MarkerName: string\n      MarkerID: string | number\n      IsShow: number\n    },\n    locate = true\n  ) {\n    const sig = L.icon({\n      iconUrl: `https://cdn.xplusship.com/img/images/flag/flag${item.MarkerType}.png`,\n      iconSize: [16, 16], // size of the icon\n      shadowSize: [0, 0], // size of the shadow\n      iconAnchor: [8, 16], // point of the icon which will correspond to marker's location\n      shadowAnchor: [0, 0], // the same for the shadow\n      popupAnchor: [0, 0],\n    })\n    const newP = CanvasShipUtils.GPSEncryptByMapToLatLng(\n      L.latLng(item.Lat, item.Lon),\n      this.map\n    )\n    const latLng: L.LatLngExpression = [newP.lat, newP.lng]\n    const matker = L.marker(latLng, {\n      icon: sig,\n    }).bindTooltip(`<em></em>${item.MarkerName}`, {\n      direction: 'right',\n      permanent: true,\n      className: 'my_css_class',\n    })\n\n    this.drawMarker[item.MarkerID] = matker\n\n    if (item.IsShow == 1) {\n      matker.addTo(this.map)\n    }\n    if (locate) {\n      this.map.fitBounds([latLng] as any)\n    }\n  }\n\n  //调整区域名称偏移\n  getDescriptOffset() {\n    const offset = {\n      X: 10,\n      Y: 0,\n    }\n    return offset\n  }\n\n  //页面统一显示GPS\n  _showLatLntToGPS(latLng: any) {\n    const ll = L.extend({}, latLng)\n    return CanvasShipUtils.getGPSLatLngByMap(ll, this.map)\n  }\n}\n\nexport { OverLayers }\n"],"names":["p","constructor","a","e","this","options","shape","templineStyle","color","dashArray","hintlineStyle","markerStyle","draggable","pathOptions","dash","snappable","Rectange","weight","fillColor","fillOpacity","Polygon","Circle","radius","Sector","startAngle","stopAngle","stroke","opacity","clickable","keyboard","zIndexOffset","FreeDraw","callbackWin","temp_areaID","_drawInstance","layerHash","layerHashName","_zoomend","_tempAreaArray","hashData","drawMarker","map","init","onLayerChange","polyNameChange","on","layer","_showInputArea","Draw","edit","setStyle","Object","assign","_layerChange","shipsService","setZIndex","workingLayer","getLayer","getLatLngs","getLatLng","pm","_outerMarker","l","getUuid","t","removeLayer","s","redraw","r","getBounds","isValid","intersects","showName","AreaName","window","addArea","push","addLayer","setTimeout","forEach","restoreZIndex","mapType","getFeatureLabel","attributes","fill","xShift","offset","initDraw","start","remove","clear","includes","setOpts","end","begin","removeInstanceLayer","endEdit","cancelEdit","IsShow","h","extend","showArea","Points","split","i","length","o","n","GPSEncryptByMapToLatLng","latLng","Number","parseFloat","wrap","latlngsFrom180","AreaID","AreaStyle","JSON","parse","AreaShape","show","locate","Radius","drawMarkClear","keys","showMarker","icon","iconUrl","MarkerType","iconSize","shadowSize","iconAnchor","shadowAnchor","popupAnchor","Lat","Lon","lat","lng","marker","bindTooltip","MarkerName","direction","permanent","className","MarkerID","addTo","fitBounds","getDescriptOffset","X","Y","_showLatLntToGPS","getGPSLatLngByMap"],"mappings":"+IAAqJ,MAAMA,EAAE,WAAAC,CAAYC,EAAEC,GAAGC,KAAKC,QAAQ,CAACC,MAAM,UAAUC,cAAc,CAACC,MAAM,MAAMC,UAAU,CAAC,EAAE,IAAIC,cAAc,CAACF,MAAM,MAAMC,UAAU,CAAC,EAAE,IAAIE,YAAY,CAACC,WAAU,GAAIC,YAAY,CAACC,MAAK,EAAGL,UAAU,CAAC,EAAE,IAAIG,WAAU,EAAGG,WAAU,GAAIX,KAAKY,SAAS,CAACX,QAAQ,CAACC,MAAM,YAAYC,cAAc,CAACC,MAAM,MAAMC,UAAU,CAAC,EAAE,GAAGQ,OAAO,GAAGP,cAAc,CAACF,MAAM,MAAMC,UAAU,CAAC,EAAE,GAAGQ,OAAO,GAAGJ,YAAY,CAACL,MAAM,gBAAgBU,UAAU,gBAAgBC,YAAY,GAAGV,UAAU,CAAC,EAAE,GAAGQ,OAAO,KAAKb,KAAKgB,QAAQ,CAACf,QAAQ,CAACC,MAAM,UAAUC,cAAc,CAACC,MAAM,MAAMC,UAAU,CAAC,EAAE,GAAGQ,OAAO,GAAGP,cAAc,CAACF,MAAM,MAAMC,UAAU,CAAC,EAAE,GAAGQ,OAAO,GAAGJ,YAAY,CAACL,MAAM,gBAAgBU,UAAU,gBAAgBC,YAAY,GAAGV,UAAU,CAAC,EAAE,GAAGQ,OAAO,KAAKb,KAAKiB,OAAO,CAAChB,QAAQ,CAACC,MAAM,SAASC,cAAc,CAACC,MAAM,MAAMC,UAAU,CAAC,EAAE,GAAGQ,OAAO,GAAGP,cAAc,CAACF,MAAM,MAAMC,UAA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