@vtx/map 1.1.7 → 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/lib/VtxMap/AMap/AMap.js +3287 -2990
  2. package/lib/VtxMap/AMap/AMap.js.map +1 -0
  3. package/lib/VtxMap/BMap/Map.js +3517 -3146
  4. package/lib/VtxMap/BMap/Map.js.map +1 -0
  5. package/lib/VtxMap/GMap/Map.js +4572 -4021
  6. package/lib/VtxMap/GMap/Map.js.map +1 -0
  7. package/lib/VtxMap/Map.js +77 -63
  8. package/lib/VtxMap/Map.js.map +1 -0
  9. package/lib/VtxMap/MapToolFunction.js +422 -370
  10. package/lib/VtxMap/MapToolFunction.js.map +1 -0
  11. package/lib/VtxMap/OMap/Map.css +2 -2
  12. package/lib/VtxMap/OMap/Map.js +4345 -3782
  13. package/lib/VtxMap/OMap/Map.js.map +1 -0
  14. package/lib/VtxMap/OlMap/Map.css +4 -1
  15. package/lib/VtxMap/OlMap/Map.js +3938 -3489
  16. package/lib/VtxMap/OlMap/Map.js.map +1 -0
  17. package/lib/VtxMap/TMap/TMap.css +0 -1
  18. package/lib/VtxMap/TMap/TMap.js +3475 -3139
  19. package/lib/VtxMap/TMap/TMap.js.map +1 -0
  20. package/lib/VtxMap/index.js +37 -24
  21. package/lib/VtxMap/index.js.map +1 -0
  22. package/lib/VtxMap/mapPlayer.js +353 -308
  23. package/lib/VtxMap/mapPlayer.js.map +1 -0
  24. package/lib/VtxMap/optimizingPointMap.js +245 -205
  25. package/lib/VtxMap/optimizingPointMap.js.map +1 -0
  26. package/lib/VtxMap/style/css.js +16 -0
  27. package/lib/VtxMap/style/css.js.map +1 -0
  28. package/lib/VtxMap/style/index.js +16 -0
  29. package/lib/VtxMap/style/index.js.map +1 -0
  30. package/lib/VtxMap/zoomMap.js +120 -101
  31. package/lib/VtxMap/zoomMap.js.map +1 -0
  32. package/lib/VtxModal/VtxModal.css +62 -0
  33. package/lib/VtxModal/VtxModal.js +223 -213
  34. package/lib/VtxModal/VtxModal.js.map +1 -0
  35. package/lib/VtxModal/VtxModal.less +2 -2
  36. package/lib/VtxModal/VtxModalAntd3.css +62 -0
  37. package/lib/VtxModal/VtxModalAntd3.less +67 -0
  38. package/lib/VtxModal/draggableModal.js +138 -119
  39. package/lib/VtxModal/draggableModal.js.map +1 -0
  40. package/lib/VtxModal/index.js +21 -14
  41. package/lib/VtxModal/index.js.map +1 -0
  42. package/lib/VtxModal/style/css.js +21 -0
  43. package/lib/VtxModal/style/css.js.map +1 -0
  44. package/lib/VtxModal/style/index.js +21 -0
  45. package/lib/VtxModal/style/index.js.map +1 -0
  46. package/lib/VtxSearchMap/VtxSearchMap.css +171 -0
  47. package/lib/VtxSearchMap/VtxSearchMap.js +864 -819
  48. package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -0
  49. package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
  50. package/lib/VtxSearchMap/VtxSearchMapAntd3.less +1 -0
  51. package/lib/VtxSearchMap/index.js +9 -9
  52. package/lib/VtxSearchMap/index.js.map +1 -0
  53. package/lib/VtxSearchMap/mapping.js +15 -12
  54. package/lib/VtxSearchMap/mapping.js.map +1 -0
  55. package/lib/VtxSearchMap/style/css.js +47 -0
  56. package/lib/VtxSearchMap/style/css.js.map +1 -0
  57. package/lib/VtxSearchMap/style/index.js +47 -0
  58. package/lib/VtxSearchMap/style/index.js.map +1 -0
  59. package/lib/default.js +32 -27
  60. package/lib/default.js.map +1 -0
  61. package/lib/index.js +9 -10
  62. package/lib/index.js.map +1 -0
  63. package/package.json +25 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapPlayer.js","names":["MapPlayer","map","path","speed","playRate","pointSetting","lineSetting","enableRotation","mapMove","onChange","playFrame","config","width","height","markerContentX","markerContentY","lineWidth","color","uniqueID","Date","valueOf","parseInt","Math","random","_pointId","_lineId","_currentIndex","_supplementPoints","_currentSupplementIndex","_timer","loadMapComplete","then","_redraw","length","GM","isRepetition","removeGraphic","currentPoint","pointObj","id","latitude","longitude","labelContent","name","deg","_getIconAngle","x","y","updatePoint","setCenter","addPoint","paths","i","push","lineObj","updateLine","addLine","clearTimeout","start","end","diff_x","diff_y","ag","atan","PI","p1","p2","currentLng","currentLat","nextLng","nextLat","runTime","calculateDistance","supplementNum","ceil","lng_spacing","lat_spacing","supplementPoints","_clearTimer","setTimeout","play","spPoints","_generateSupplyPoints","onPlayPause","newPlayRate","newSpPoints","slice","pIndex","newPath"],"sources":["VtxMap/mapPlayer.js"],"sourcesContent":["/* \r\n地图实例:@map\r\n需要播放的点位数组:@path --- [{longitude,latitude,name,id}]\r\n\r\n播放速度:@speed --- Number\r\n播放倍率:@playRate,\r\n点位设置:@pointSetting,\r\n线设置:@lineSetting,\r\n是否开启图标自动旋转:@enableRotation,\r\n点位变化事件:@onChange\r\nsetSpeed\r\nsetCurrentIndex\r\nplay\r\npause\r\nstop\r\ndestroy\r\n*/\r\nexport default class MapPlayer{\r\n constructor({map,path,speed,playRate,pointSetting,lineSetting,enableRotation,mapMove,onChange}){\r\n this.map = map; //地图实例\r\n this.path = path||[]; //点位数组\r\n this.speed = speed||12;//点位移动速度,m/s\r\n this.playFrame = 24; //播放帧率\r\n this.playRate = playRate||1; //播放速率\r\n this.enableRotation = enableRotation||false; //是否开启图标自动旋转\r\n this.mapMove = mapMove||false; //地图是否跟随播放点位移动\r\n this.pointSetting = pointSetting||{\r\n config:{\r\n width:30,\r\n height:30, \r\n markerContentX:-15,\r\n markerContentY:-15, \r\n }\r\n }\r\n this.lineSetting = lineSetting||{lineWidth:3,color:'blue'}; //线的样式配置\r\n this.onChange = onChange;\r\n \r\n const uniqueID = `${new Date().valueOf()}_${parseInt(Math.random()*100000000)}`;\r\n this._pointId = `point_${uniqueID}`;\r\n this._lineId = `line_${uniqueID}`;\r\n this._currentIndex = 0; //当前播放的点位序号\r\n this._supplementPoints = [];//补点列表\r\n this._currentSupplementIndex = 0;//当前补点序号\r\n this._timer = null; //播放定时器\r\n this.map.loadMapComplete.then(()=>{\r\n this._redraw();\r\n })\r\n \r\n }\r\n // 根据当前数据重新渲染点和线的图形\r\n _redraw(){\r\n if(this.path.length==0 ){\r\n this.map.GM.isRepetition(this._pointId) && this.map.removeGraphic(this._pointId);\r\n this.map.GM.isRepetition(this._lineId) && this.map.removeGraphic(this._lineId);\r\n return;\r\n }\r\n if(this._currentIndex < this.path.length){\r\n // 画点\r\n let currentPoint;\r\n if(this._currentIndex==this.path.length-1 || this._supplementPoints.length==0){\r\n currentPoint = this.path[this._currentIndex];\r\n }\r\n else{\r\n currentPoint = this._supplementPoints[this._currentSupplementIndex];\r\n }\r\n let pointObj = {\r\n ...currentPoint,\r\n id: this._pointId,\r\n latitude:currentPoint.latitude,\r\n longitude:currentPoint.longitude,\r\n ...this.pointSetting,\r\n config:{\r\n ...(this.pointSetting.config||{}),\r\n labelContent:currentPoint.name||'',\r\n }\r\n }\r\n if(this.enableRotation){\r\n const deg = this._currentIndex+1<this.path.length?this._getIconAngle({\r\n x:this.path[this._currentIndex].longitude,\r\n y:this.path[this._currentIndex].latitude,\r\n },{\r\n x:this.path[this._currentIndex+1].longitude,\r\n y:this.path[this._currentIndex+1].latitude\r\n }):0;\r\n pointObj.config.deg = deg;\r\n }\r\n \r\n if(this.map.GM.isRepetition(this._pointId)){\r\n this.map.updatePoint([pointObj]);\r\n this.mapMove && this.map.setCenter([pointObj.longitude,pointObj.latitude]);\r\n }\r\n else{\r\n this.map.addPoint([pointObj],'defined');\r\n }\r\n // 画线\r\n let paths = [];\r\n for(let i=0; i<=this._currentIndex; i++){\r\n paths.push([this.path[i].longitude,this.path[i].latitude]);\r\n }\r\n \r\n if(this._supplementPoints.length>0){\r\n for(let i=0;i<=this._currentSupplementIndex;i++){\r\n paths.push([this._supplementPoints[i].longitude,this._supplementPoints[i].latitude])\r\n }\r\n }\r\n if(paths.length>1){\r\n const lineObj = {\r\n id:this._lineId,\r\n paths,\r\n config:this.lineSetting\r\n }\r\n if(this.map.GM.isRepetition(this._lineId)){\r\n this.map.updateLine([lineObj]);\r\n }\r\n else{\r\n this.map.addLine([lineObj],'defined');\r\n }\r\n }\r\n else{\r\n if(this.map.GM.isRepetition(this._lineId)){\r\n this.map.removeGraphic(this._lineId);\r\n } \r\n } \r\n }\r\n }\r\n _clearTimer(){\r\n if(this._timer){\r\n clearTimeout(this._timer);\r\n this._timer = null;\r\n }\r\n }\r\n // 计算图标转动角度(仅适用于当前车辆图标,仅适用于中国区域)\r\n _getIconAngle(start,end){\r\n const diff_x = end.x - start.x,\r\n diff_y = end.y - start.y;\r\n // 1,4象限夹脚计算\r\n const ag = 360*Math.atan(diff_y/diff_x)/(2*Math.PI);\r\n // 地图夹角偏转计算\r\n if(diff_x==0){\r\n if(diff_y>0){\r\n return -90;\r\n }\r\n else if(diff_y<0){\r\n return 90;\r\n }\r\n else{\r\n return 0;\r\n }\r\n }\r\n // 坐标系1,4象限\r\n else if(diff_x>0){\r\n return -ag;\r\n }\r\n // 坐标系2,3象限\r\n else{\r\n return 180 - ag;\r\n }\r\n }\r\n // 根据两点生成补点列表\r\n _generateSupplyPoints(p1,p2){\r\n const {longitude:currentLng, latitude:currentLat} = p1;\r\n const {longitude:nextLng, latitude:nextLat} = p2;\r\n const runTime = this.map.calculateDistance([\r\n [currentLng,currentLat],\r\n [nextLng,nextLat]\r\n ])/(this.speed*this.playRate);\r\n //不需要补点 \r\n if(runTime<=1/this.playFrame){\r\n return [];\r\n }\r\n // 需要补点\r\n else{\r\n const supplementNum = Math.ceil(runTime/(1/this.playFrame))-1;\r\n const lng_spacing = (nextLng - currentLng)/(supplementNum+1);\r\n const lat_spacing = (nextLat - currentLat)/(supplementNum+1);\r\n let supplementPoints = [];\r\n for(let i=1;i<=supplementNum;i++){\r\n supplementPoints.push({\r\n ...this.path[this._currentIndex],\r\n longitude:currentLng+lng_spacing*i,\r\n latitude:currentLat+lat_spacing*i,\r\n });\r\n }\r\n return supplementPoints;\r\n }\r\n }\r\n // 开始播放\r\n play(){\r\n this._clearTimer();\r\n if(this.path.length==0 || this._currentIndex==this.path.length-1){\r\n return;\r\n };\r\n // 当前处于补点播放\r\n if(this._supplementPoints.length>0){\r\n this._timer = setTimeout(()=>{\r\n if(this._currentSupplementIndex<this._supplementPoints.length-1){\r\n this._currentSupplementIndex = this._currentSupplementIndex+1;\r\n }\r\n else{\r\n this._currentSupplementIndex = 0;\r\n this._supplementPoints = [];\r\n this._currentIndex = this._currentIndex+1;\r\n typeof this.onChange=='function' && this.onChange(this.path[this._currentIndex],this._currentIndex);\r\n }\r\n this._redraw();\r\n this.play();\r\n },1000/this.playFrame);\r\n }\r\n // 当前处于非补点播放\r\n else{\r\n const spPoints = this._generateSupplyPoints(this.path[this._currentIndex],this.path[this._currentIndex+1]);\r\n //不需要补点 \r\n if(spPoints.length==0){\r\n this._timer = setTimeout(()=>{\r\n this._currentIndex = this._currentIndex+1;\r\n typeof this.onChange=='function' && this.onChange(this.path[this._currentIndex],this._currentIndex);\r\n this._redraw();\r\n this.play();\r\n },1000/this.playFrame);\r\n }\r\n // 需要补点\r\n else{\r\n this._timer = setTimeout(()=>{\r\n this._currentSupplementIndex = 0;\r\n this._supplementPoints = spPoints;\r\n this._redraw();\r\n this.play();\r\n },1000/this.playFrame);\r\n }\r\n } \r\n }\r\n // 暂停播放\r\n pause(onPlayPause){\r\n this._clearTimer();\r\n typeof onPlayPause == \"function\" && onPlayPause(this.path[this._currentIndex],this._currentIndex);\r\n }\r\n // 停止播放(回到初始点位)\r\n stop(){\r\n this._clearTimer();\r\n this._currentIndex = 0;\r\n this._supplementPoints = [];\r\n this._currentSupplementIndex = 0;\r\n this._redraw();\r\n // typeof this.onChange == \"function\" && this.onChange(this.path[0],0);\r\n }\r\n // 销毁(删除所有添加的图层)\r\n destroy(){\r\n this._clearTimer();\r\n this.map.removeGraphic(this._pointId);\r\n this.map.removeGraphic(this._lineId);\r\n this._currentIndex = 0;\r\n this._supplementPoints = [];\r\n this._currentSupplementIndex = 0;\r\n }\r\n // 设置速度\r\n setPlayRate(newPlayRate){\r\n this.playRate = newPlayRate;\r\n //如果当前处于补点状态,重新生成新的补点\r\n if(this._supplementPoints.length>0){\r\n const newSpPoints = this._generateSupplyPoints(this._supplementPoints[this._currentSupplementIndex],this.path[this._currentIndex+1]);\r\n this._supplementPoints = [...this._supplementPoints.slice(0,this._currentSupplementIndex+1),...newSpPoints];\r\n }\r\n }\r\n // 设置当前播放点位的位置\r\n setCurrentIndex(pIndex){\r\n if(pIndex >= this.path.length)return;\r\n \r\n this._currentIndex = pIndex;\r\n this._supplementPoints = [];\r\n this._currentSupplementIndex = 0;\r\n // typeof this.onChange == \"function\" && this.onChange(this.path[pIndex],pIndex);\r\n this._redraw();\r\n if(this._timer){\r\n this._clearTimer();\r\n this.play();\r\n }\r\n }\r\n // 重新设置播放路线\r\n setPath(newPath){\r\n this.path = newPath;\r\n this._currentIndex = 0;\r\n this._supplementPoints = [];\r\n this._currentSupplementIndex = 0;\r\n this._redraw();\r\n if(this._timer){\r\n this._clearTimer();\r\n this.play();\r\n }\r\n }\r\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACqBA,S;EACjB,yBAA+F;IAAA;;IAAA,IAAlFC,GAAkF,QAAlFA,GAAkF;IAAA,IAA9EC,IAA8E,QAA9EA,IAA8E;IAAA,IAAzEC,KAAyE,QAAzEA,KAAyE;IAAA,IAAnEC,QAAmE,QAAnEA,QAAmE;IAAA,IAA1DC,YAA0D,QAA1DA,YAA0D;IAAA,IAA7CC,WAA6C,QAA7CA,WAA6C;IAAA,IAAjCC,cAAiC,QAAjCA,cAAiC;IAAA,IAAlBC,OAAkB,QAAlBA,OAAkB;IAAA,IAAVC,QAAU,QAAVA,QAAU;;IAAA;;IAC3F,KAAKR,GAAL,GAAWA,GAAX,CAD2F,CAC3E;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X,KAAKiD,WAAL;;QACA,KAAKE,IAAL;MACH;IACJ"}
@@ -1,238 +1,278 @@
1
- 'use strict';
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
4
 
3
5
  Object.defineProperty(exports, "__esModule", {
4
- value: true
6
+ value: true
5
7
  });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _Map = _interopRequireDefault(require("./Map"));
6
13
 
7
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
14
+ var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
8
15
 
9
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
17
 
11
- var _react = require('react');
18
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12
19
 
13
- var _react2 = _interopRequireDefault(_react);
20
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
21
 
15
- var _Map = require('./Map');
22
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
23
 
17
- var _Map2 = _interopRequireDefault(_Map);
24
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
25
 
19
- var _isEqual2 = require('lodash/isEqual');
26
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
27
 
21
- var _isEqual3 = _interopRequireDefault(_isEqual2);
28
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
22
29
 
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
31
 
25
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
32
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
33
+
34
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
35
 
27
36
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
28
37
 
29
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
38
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
30
39
 
31
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
40
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
32
41
 
33
- var OptimizingPointMap = function (_React$Component) {
34
- _inherits(OptimizingPointMap, _React$Component);
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
35
43
 
36
- function OptimizingPointMap(props) {
37
- _classCallCheck(this, OptimizingPointMap);
44
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
38
45
 
39
- var _this = _possibleConstructorReturn(this, (OptimizingPointMap.__proto__ || Object.getPrototypeOf(OptimizingPointMap)).call(this, props));
46
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
40
47
 
41
- _this.map = null;
42
- _this.mapLoaded = false;
43
- _this.MPP = new mapPointsProcessor(props.gridSpacing || 40);
44
- _this.state = {
45
- filterPoints: []
46
- };
47
- _this.zoomEnd = _this.zoomEnd.bind(_this);
48
- _this.moveEnd = _this.moveEnd.bind(_this);
49
- _this.resetPoints = _this.resetPoints.bind(_this);
48
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
49
+
50
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
51
+
52
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
53
+
54
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
+
56
+ var OptimizingPointMap = /*#__PURE__*/function (_React$Component) {
57
+ _inherits(OptimizingPointMap, _React$Component);
58
+
59
+ var _super = _createSuper(OptimizingPointMap);
50
60
 
51
- _this.resetDelay = {
52
- timer: null,
53
- eType: null
61
+ function OptimizingPointMap(props) {
62
+ var _this;
63
+
64
+ _classCallCheck(this, OptimizingPointMap);
65
+
66
+ _this = _super.call(this, props);
67
+ _this.map = null;
68
+ _this.mapLoaded = false;
69
+ _this.MPP = new mapPointsProcessor(props.gridSpacing || 40);
70
+ _this.state = {
71
+ filterPoints: []
72
+ };
73
+ _this.zoomEnd = _this.zoomEnd.bind(_assertThisInitialized(_this));
74
+ _this.moveEnd = _this.moveEnd.bind(_assertThisInitialized(_this));
75
+ _this.resetPoints = _this.resetPoints.bind(_assertThisInitialized(_this));
76
+ _this.resetDelay = {
77
+ timer: null,
78
+ eType: null
79
+ };
80
+ return _this;
81
+ }
82
+
83
+ _createClass(OptimizingPointMap, [{
84
+ key: "resetPoints",
85
+ value: function resetPoints(props, eType) {
86
+ var t = this; // 延时优化,只处理最后一次操作
87
+
88
+ if (t.resetDelay.timer) {
89
+ clearTimeout(t.resetDelay.timer);
90
+ }
91
+
92
+ t.resetDelay.eType = t.resetDelay.eType == 'zoom' || eType == 'zoom' ? 'zoom' : eType;
93
+ t.resetDelay.timer = setTimeout(function () {
94
+ var mcfg = t.map.getMapExtent();
95
+ var param = {
96
+ mapHeight: mcfg.mapSize.height,
97
+ mapWidth: mcfg.mapSize.width,
98
+ minLat: mcfg.southWest.lat,
99
+ maxLat: mcfg.northEast.lat,
100
+ minLng: mcfg.southWest.lng,
101
+ maxLng: mcfg.northEast.lng,
102
+ eType: t.resetDelay.eType,
103
+ allPoints: props.mapPoints,
104
+ reservedPoints: props.reservedPoints
54
105
  };
55
- return _this;
106
+ t.setState({
107
+ filterPoints: t.MPP.pointFilter(param)
108
+ });
109
+ t.resetDelay.timer = null;
110
+ t.resetDelay.eType = null;
111
+ }, 200);
56
112
  }
113
+ }, {
114
+ key: "componentDidMount",
115
+ value: function componentDidMount() {
116
+ var _this2 = this;
57
117
 
58
- _createClass(OptimizingPointMap, [{
59
- key: 'resetPoints',
60
- value: function resetPoints(props, eType) {
61
- var t = this;
62
- // 延时优化,只处理最后一次操作
63
- if (t.resetDelay.timer) {
64
- clearTimeout(t.resetDelay.timer);
65
- }
66
- t.resetDelay.eType = t.resetDelay.eType == 'zoom' || eType == 'zoom' ? 'zoom' : eType;
67
- t.resetDelay.timer = setTimeout(function () {
68
- var mcfg = t.map.getMapExtent();
69
- var param = {
70
- mapHeight: mcfg.mapSize.height,
71
- mapWidth: mcfg.mapSize.width,
72
- minLat: mcfg.southWest.lat,
73
- maxLat: mcfg.northEast.lat,
74
- minLng: mcfg.southWest.lng,
75
- maxLng: mcfg.northEast.lng,
76
- eType: t.resetDelay.eType,
77
- allPoints: props.mapPoints,
78
- reservedPoints: props.reservedPoints
79
- };
80
- t.setState({
81
- filterPoints: t.MPP.pointFilter(param)
82
- });
83
- t.resetDelay.timer = null;
84
- t.resetDelay.eType = null;
85
- }, 200);
86
- }
87
- }, {
88
- key: 'componentDidMount',
89
- value: function componentDidMount() {
90
- var _this2 = this;
91
-
92
- this.map.loadMapComplete.then(function () {
93
- _this2.resetPoints(_this2.props);
94
- _this2.mapLoaded = true;
95
- });
96
- }
97
- }, {
98
- key: 'componentWillReceiveProps',
99
- value: function componentWillReceiveProps(nextProps) {
100
- if (this.mapLoaded && (!(0, _isEqual3.default)(this.props.reservedPoints, nextProps.reservedPoints) || !(0, _isEqual3.default)(this.props.mapPoints, nextProps.mapPoints))) {
101
- // 外部点数据改变,更新内部点数据
102
- this.resetPoints(nextProps);
103
- }
104
- }
105
- }, {
106
- key: 'zoomEnd',
107
- value: function zoomEnd(obj) {
108
- this.resetPoints(this.props, 'zoom');
109
- if (typeof this.props.zoomEnd === "function") {
110
- this.props.zoomEnd(obj);
111
- }
112
- }
113
- }, {
114
- key: 'moveEnd',
115
- value: function moveEnd(obj) {
116
- this.resetPoints(this.props, 'move');
117
- if (typeof this.props.moveEnd === "function") {
118
- this.props.moveEnd(obj);
119
- }
120
- }
121
- }, {
122
- key: 'render',
123
- value: function render() {
124
- var _this3 = this;
125
-
126
- // console.log('优化后剩余点数:'+this.state.filterPoints.length)
127
- var newProps = _extends({}, this.props, {
128
- zoomEnd: this.zoomEnd,
129
- moveEnd: this.moveEnd,
130
- mapPoints: this.state.filterPoints,
131
- getMapInstance: function getMapInstance(p) {
132
- if (p) {
133
- _this3.map = p;
134
- }
135
- if (typeof _this3.props.getMapInstance === "function") {
136
- _this3.props.getMapInstance(p);
137
- }
138
- }
139
- });
140
- delete newProps.gridSpacing;
141
- delete newProps.reservedPoints;
142
-
143
- return _react2.default.createElement(_Map2.default, newProps);
144
- }
145
- }]);
146
-
147
- return OptimizingPointMap;
148
- }(_react2.default.Component);
149
-
150
- var mapPointsProcessor = function () {
151
- function mapPointsProcessor(gridSpacing) {
152
- _classCallCheck(this, mapPointsProcessor);
153
-
154
- this.GRIDSPACING = gridSpacing || 40;
155
- this.mapHeight = null; //地图高度
156
- this.mapWidth = null; //地图宽度
157
- // 若地图大小不变,zoom不变,网格的经纬度间隔应该保持不变以保证前后两次网格位置保持一致
158
- this.lngInterval = null; //划分的网格经度间隔
159
- this.latInterval = null; //划分的网格纬度间隔
160
- this.maxLat = null, this.minLat = null, this.maxLng = null, this.minLng = null;
118
+ this.map.loadMapComplete.then(function () {
119
+ _this2.resetPoints(_this2.props);
120
+
121
+ _this2.mapLoaded = true;
122
+ });
123
+ }
124
+ }, {
125
+ key: "componentWillReceiveProps",
126
+ value: function componentWillReceiveProps(nextProps) {
127
+ if (this.mapLoaded && (!(0, _isEqual2["default"])(this.props.reservedPoints, nextProps.reservedPoints) || !(0, _isEqual2["default"])(this.props.mapPoints, nextProps.mapPoints))) {
128
+ // 外部点数据改变,更新内部点数据
129
+ this.resetPoints(nextProps);
130
+ }
131
+ }
132
+ }, {
133
+ key: "zoomEnd",
134
+ value: function zoomEnd(obj) {
135
+ this.resetPoints(this.props, 'zoom');
136
+
137
+ if (typeof this.props.zoomEnd === "function") {
138
+ this.props.zoomEnd(obj);
139
+ }
161
140
  }
141
+ }, {
142
+ key: "moveEnd",
143
+ value: function moveEnd(obj) {
144
+ this.resetPoints(this.props, 'move');
145
+
146
+ if (typeof this.props.moveEnd === "function") {
147
+ this.props.moveEnd(obj);
148
+ }
149
+ }
150
+ }, {
151
+ key: "render",
152
+ value: function render() {
153
+ var _this3 = this;
154
+
155
+ // console.log('优化后剩余点数:'+this.state.filterPoints.length)
156
+ var newProps = _objectSpread(_objectSpread({}, this.props), {}, {
157
+ zoomEnd: this.zoomEnd,
158
+ moveEnd: this.moveEnd,
159
+ mapPoints: this.state.filterPoints,
160
+ getMapInstance: function getMapInstance(p) {
161
+ if (p) {
162
+ _this3.map = p;
163
+ }
164
+
165
+ if (typeof _this3.props.getMapInstance === "function") {
166
+ _this3.props.getMapInstance(p);
167
+ }
168
+ }
169
+ });
162
170
 
163
- _createClass(mapPointsProcessor, [{
164
- key: 'resetMapConfig',
165
- value: function resetMapConfig(param) {
166
- // 若没传地图相关参数默认使用上次的地图参数
167
- var mapHeight = param.mapHeight,
168
- mapWidth = param.mapWidth,
169
- maxLat = param.maxLat,
170
- minLat = param.minLat,
171
- maxLng = param.maxLng,
172
- minLng = param.minLng,
173
- eType = param.eType;
174
-
175
- this.maxLat = maxLat || this.maxLat;
176
- this.minLat = minLat || this.minLat;
177
- this.maxLng = maxLng || this.maxLng;
178
- this.minLng = minLng || this.minLng;
179
- // 当操作为zoom(改变最大最小经纬度)或地图宽高改变则重新计算网格
180
- if (eType == 'zoom' || mapHeight && mapHeight != this.mapHeight || mapWidth && mapWidth != this.mapWidth) {
181
- this.mapHeight = mapHeight || this.mapHeight;
182
- this.mapWidth = mapWidth || this.mapWidth;
183
- this.calGridInterval();
184
- }
171
+ delete newProps.gridSpacing;
172
+ delete newProps.reservedPoints;
173
+ return /*#__PURE__*/_react["default"].createElement(_Map["default"], newProps);
174
+ }
175
+ }]);
176
+
177
+ return OptimizingPointMap;
178
+ }(_react["default"].Component);
179
+
180
+ var mapPointsProcessor = /*#__PURE__*/function () {
181
+ function mapPointsProcessor(gridSpacing) {
182
+ _classCallCheck(this, mapPointsProcessor);
183
+
184
+ this.GRIDSPACING = gridSpacing || 40;
185
+ this.mapHeight = null; //地图高度
186
+
187
+ this.mapWidth = null; //地图宽度
188
+ // 若地图大小不变,zoom不变,网格的经纬度间隔应该保持不变以保证前后两次网格位置保持一致
189
+
190
+ this.lngInterval = null; //划分的网格经度间隔
191
+
192
+ this.latInterval = null; //划分的网格纬度间隔
193
+
194
+ this.maxLat = null, this.minLat = null, this.maxLng = null, this.minLng = null;
195
+ }
196
+
197
+ _createClass(mapPointsProcessor, [{
198
+ key: "resetMapConfig",
199
+ value: function resetMapConfig(param) {
200
+ // 若没传地图相关参数默认使用上次的地图参数
201
+ var mapHeight = param.mapHeight,
202
+ mapWidth = param.mapWidth,
203
+ maxLat = param.maxLat,
204
+ minLat = param.minLat,
205
+ maxLng = param.maxLng,
206
+ minLng = param.minLng,
207
+ eType = param.eType;
208
+ this.maxLat = maxLat || this.maxLat;
209
+ this.minLat = minLat || this.minLat;
210
+ this.maxLng = maxLng || this.maxLng;
211
+ this.minLng = minLng || this.minLng; // 当操作为zoom(改变最大最小经纬度)或地图宽高改变则重新计算网格
212
+
213
+ if (eType == 'zoom' || mapHeight && mapHeight != this.mapHeight || mapWidth && mapWidth != this.mapWidth) {
214
+ this.mapHeight = mapHeight || this.mapHeight;
215
+ this.mapWidth = mapWidth || this.mapWidth;
216
+ this.calGridInterval();
217
+ }
218
+ }
219
+ }, {
220
+ key: "calGridInterval",
221
+ value: function calGridInterval() {
222
+ var x_num = Math.ceil(this.mapWidth / this.GRIDSPACING);
223
+ var y_num = Math.ceil(this.mapHeight / this.GRIDSPACING);
224
+ this.lngInterval = parseFloat(((this.maxLng - this.minLng) / x_num).toFixed(6));
225
+ this.latInterval = parseFloat(((this.maxLat - this.minLat) / y_num).toFixed(6));
226
+ }
227
+ }, {
228
+ key: "pointFilter",
229
+ value: function pointFilter(param) {
230
+ // allPoints为必填参数
231
+ var allPoints = param.allPoints,
232
+ _param$reservedPoints = param.reservedPoints,
233
+ reservedPoints = _param$reservedPoints === void 0 ? [] : _param$reservedPoints;
234
+ this.resetMapConfig(param);
235
+ var hashPoints = {};
236
+
237
+ for (var i = 0, len = allPoints.length; i < len; i++) {
238
+ var p_lng = allPoints[i].longitude;
239
+ var p_lat = allPoints[i].latitude;
240
+
241
+ if (p_lng > this.maxLng || p_lng < this.minLng || p_lat > this.maxLat || p_lat < this.minLat) {
242
+ continue;
185
243
  }
186
- }, {
187
- key: 'calGridInterval',
188
- value: function calGridInterval() {
189
- var x_num = Math.ceil(this.mapWidth / this.GRIDSPACING);
190
- var y_num = Math.ceil(this.mapHeight / this.GRIDSPACING);
191
- this.lngInterval = parseFloat(((this.maxLng - this.minLng) / x_num).toFixed(6));
192
- this.latInterval = parseFloat(((this.maxLat - this.minLat) / y_num).toFixed(6));
244
+
245
+ var x_index = parseInt(p_lng / this.lngInterval);
246
+ var y_index = parseInt(p_lat / this.latInterval);
247
+ var hashIndex = x_index + '-' + y_index;
248
+
249
+ if (!hashPoints[hashIndex]) {
250
+ hashPoints[hashIndex] = allPoints[i];
193
251
  }
194
- }, {
195
- key: 'pointFilter',
196
- value: function pointFilter(param) {
197
- // allPoints为必填参数
198
- var allPoints = param.allPoints,
199
- _param$reservedPoints = param.reservedPoints,
200
- reservedPoints = _param$reservedPoints === undefined ? [] : _param$reservedPoints;
201
-
202
- this.resetMapConfig(param);
203
-
204
- var hashPoints = {};
205
- for (var i = 0, len = allPoints.length; i < len; i++) {
206
- var p_lng = allPoints[i].longitude;
207
- var p_lat = allPoints[i].latitude;
208
- if (p_lng > this.maxLng || p_lng < this.minLng || p_lat > this.maxLat || p_lat < this.minLat) {
209
- continue;
210
- }
211
- var x_index = parseInt(p_lng / this.lngInterval);
212
- var y_index = parseInt(p_lat / this.latInterval);
213
- var hashIndex = x_index + '-' + y_index;
214
- if (!hashPoints[hashIndex]) {
215
- hashPoints[hashIndex] = allPoints[i];
216
- }
217
- }
218
-
219
- var filteredPoints = [].concat(_toConsumableArray(reservedPoints));
220
- var reservedIds = reservedPoints.map(function (item) {
221
- return item.id;
222
- });
223
- for (var k in hashPoints) {
224
- var the_point = hashPoints[k];
225
- if (reservedIds.indexOf(the_point.id) == -1) {
226
- filteredPoints.push(the_point);
227
- }
228
- }
229
-
230
- return filteredPoints;
252
+ }
253
+
254
+ var filteredPoints = _toConsumableArray(reservedPoints);
255
+
256
+ var reservedIds = reservedPoints.map(function (item) {
257
+ return item.id;
258
+ });
259
+
260
+ for (var k in hashPoints) {
261
+ var the_point = hashPoints[k];
262
+
263
+ if (reservedIds.indexOf(the_point.id) == -1) {
264
+ filteredPoints.push(the_point);
231
265
  }
232
- }]);
266
+ }
267
+
268
+ return filteredPoints;
269
+ }
270
+ }]);
233
271
 
234
- return mapPointsProcessor;
272
+ return mapPointsProcessor;
235
273
  }();
236
274
 
237
- exports.default = OptimizingPointMap;
238
- module.exports = exports['default'];
275
+ var _default = OptimizingPointMap;
276
+ exports["default"] = _default;
277
+ module.exports = exports["default"];
278
+ //# sourceMappingURL=optimizingPointMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optimizingPointMap.js","names":["OptimizingPointMap","props","map","mapLoaded","MPP","mapPointsProcessor","gridSpacing","state","filterPoints","zoomEnd","bind","moveEnd","resetPoints","resetDelay","timer","eType","t","clearTimeout","setTimeout","mcfg","getMapExtent","param","mapHeight","mapSize","height","mapWidth","width","minLat","southWest","lat","maxLat","northEast","minLng","lng","maxLng","allPoints","mapPoints","reservedPoints","setState","pointFilter","loadMapComplete","then","nextProps","_isEqual","obj","newProps","getMapInstance","p","React","Component","GRIDSPACING","lngInterval","latInterval","calGridInterval","x_num","Math","ceil","y_num","parseFloat","toFixed","resetMapConfig","hashPoints","i","len","length","p_lng","longitude","p_lat","latitude","x_index","parseInt","y_index","hashIndex","filteredPoints","reservedIds","item","id","k","the_point","indexOf","push"],"sources":["VtxMap/optimizingPointMap.js"],"sourcesContent":["import React from 'react';\r\nimport Map from './Map';\r\nimport _isEqual from 'lodash/isEqual';\r\n\r\nclass OptimizingPointMap extends React.Component{\r\n constructor(props){\r\n super(props);\r\n this.map = null;\r\n this.mapLoaded = false;\r\n this.MPP = new mapPointsProcessor(props.gridSpacing || 40);\r\n this.state= {\r\n filterPoints:[]\r\n }\r\n this.zoomEnd = this.zoomEnd.bind(this);\r\n this.moveEnd = this.moveEnd.bind(this);\r\n this.resetPoints = this.resetPoints.bind(this);\r\n\r\n this.resetDelay = {\r\n timer:null,\r\n eType:null\r\n }\r\n }\r\n \r\n resetPoints(props, eType){\r\n const t = this;\r\n // 延时优化,只处理最后一次操作\r\n if(t.resetDelay.timer){\r\n clearTimeout(t.resetDelay.timer);\r\n }\r\n t.resetDelay.eType = t.resetDelay.eType=='zoom'||eType=='zoom' ?'zoom':eType;\r\n t.resetDelay.timer = setTimeout(()=>{\r\n let mcfg = t.map.getMapExtent();\r\n const param = {\r\n mapHeight:mcfg.mapSize.height,\r\n mapWidth:mcfg.mapSize.width,\r\n minLat:mcfg.southWest.lat,\r\n maxLat:mcfg.northEast.lat,\r\n minLng:mcfg.southWest.lng,\r\n maxLng:mcfg.northEast.lng,\r\n eType:t.resetDelay.eType,\r\n allPoints:props.mapPoints,\r\n reservedPoints:props.reservedPoints\r\n }\r\n t.setState({\r\n filterPoints:t.MPP.pointFilter(param)\r\n });\r\n t.resetDelay.timer = null;\r\n t.resetDelay.eType = null;\r\n },200);\r\n \r\n }\r\n componentDidMount(){\r\n this.map.loadMapComplete.then(()=>{\r\n this.resetPoints(this.props);\r\n this.mapLoaded = true;\r\n })\r\n }\r\n componentWillReceiveProps(nextProps){\r\n if(this.mapLoaded && (!_isEqual(this.props.reservedPoints, nextProps.reservedPoints) || !_isEqual(this.props.mapPoints, nextProps.mapPoints))){\r\n // 外部点数据改变,更新内部点数据\r\n this.resetPoints(nextProps);\r\n }\r\n }\r\n zoomEnd(obj){\r\n this.resetPoints(this.props,'zoom');\r\n if(typeof(this.props.zoomEnd) ===\"function\"){\r\n this.props.zoomEnd(obj);\r\n }\r\n }\r\n moveEnd(obj){\r\n this.resetPoints(this.props,'move');\r\n if(typeof(this.props.moveEnd) ===\"function\"){\r\n this.props.moveEnd(obj);\r\n }\r\n }\r\n render(){ \r\n // console.log('优化后剩余点数:'+this.state.filterPoints.length) \r\n const newProps = {\r\n ...this.props,\r\n zoomEnd:this.zoomEnd,\r\n moveEnd:this.moveEnd,\r\n mapPoints:this.state.filterPoints,\r\n getMapInstance:(p)=>{\r\n if(p){\r\n this.map = p;\r\n }\r\n if(typeof(this.props.getMapInstance) ===\"function\"){\r\n this.props.getMapInstance(p);\r\n }\r\n }\r\n }\r\n delete newProps.gridSpacing;\r\n delete newProps.reservedPoints;\r\n\r\n return (<Map {...newProps} />)\r\n }\r\n}\r\n\r\n\r\nclass mapPointsProcessor{\r\n constructor(gridSpacing){\r\n this.GRIDSPACING = gridSpacing || 40;\r\n this.mapHeight = null; //地图高度\r\n this.mapWidth = null; //地图宽度\r\n // 若地图大小不变,zoom不变,网格的经纬度间隔应该保持不变以保证前后两次网格位置保持一致\r\n this.lngInterval = null; //划分的网格经度间隔\r\n this.latInterval = null; //划分的网格纬度间隔\r\n this.maxLat = null,\r\n this.minLat = null,\r\n this.maxLng = null,\r\n this.minLng = null\r\n }\r\n resetMapConfig(param){\r\n // 若没传地图相关参数默认使用上次的地图参数\r\n const {mapHeight,mapWidth,maxLat,minLat,maxLng,minLng,eType} = param;\r\n this.maxLat = maxLat || this.maxLat;\r\n this.minLat = minLat || this.minLat;\r\n this.maxLng = maxLng || this.maxLng;\r\n this.minLng = minLng || this.minLng;\r\n // 当操作为zoom(改变最大最小经纬度)或地图宽高改变则重新计算网格\r\n if(eType=='zoom' || (mapHeight && mapHeight != this.mapHeight) || (mapWidth && mapWidth != this.mapWidth)){\r\n this.mapHeight = mapHeight || this.mapHeight;\r\n this.mapWidth = mapWidth || this.mapWidth;\r\n this.calGridInterval();\r\n }\r\n }\r\n calGridInterval(){\r\n const x_num = Math.ceil(this.mapWidth/this.GRIDSPACING);\r\n const y_num = Math.ceil(this.mapHeight/this.GRIDSPACING);\r\n this.lngInterval = parseFloat(((this.maxLng - this.minLng)/x_num).toFixed(6));\r\n this.latInterval = parseFloat(((this.maxLat - this.minLat)/y_num).toFixed(6));\r\n }\r\n pointFilter(param){\r\n // allPoints为必填参数\r\n const {allPoints, reservedPoints=[]} = param;\r\n this.resetMapConfig(param);\r\n\r\n let hashPoints = {};\r\n for(let i=0,len=allPoints.length;i<len;i++){\r\n let p_lng = allPoints[i].longitude;\r\n let p_lat = allPoints[i].latitude;\r\n if(p_lng>this.maxLng || p_lng<this.minLng || p_lat>this.maxLat || p_lat<this.minLat){\r\n continue;\r\n }\r\n let x_index = parseInt(p_lng/this.lngInterval);\r\n let y_index = parseInt(p_lat/this.latInterval);\r\n let hashIndex = x_index + '-' + y_index;\r\n if(!hashPoints[hashIndex]){\r\n hashPoints[hashIndex] = allPoints[i];\r\n }\r\n }\r\n\r\n let filteredPoints = [...reservedPoints];\r\n let reservedIds = reservedPoints.map((item)=>item.id);\r\n for(let k in hashPoints){\r\n let the_point = hashPoints[k];\r\n if(reservedIds.indexOf(the_point.id)==-1){\r\n filteredPoints.push(the_point);\r\n }\r\n }\r\n \r\n return filteredPoints;\r\n }\r\n}\r\n\r\n\r\nexport default OptimizingPointMap;"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,kB;;;;;EACF,4BAAYC,KAAZ,EAAkB;IAAA;;IAAA;;IACd,0BAAMA,KAAN;IACA,MAAKC,GAAL,GAAW,IAAX;IACA,MAAKC,SAAL,GAAiB,KAAjB;IACA,MAAKC,GAAL,GAAW,IAAIC,kBAAJ,CAAuBJ,KAAK,CAACK,WAAN,IAAqB,EAA5C,CAAX;IACA,MAAKC,KAAL,GAAY;MACRC,YAAY,EAAC;IADL,CAAZ;IAGA,MAAKC,OAAL,GAAe,MAAKA,OAAL,CAAaC,IAAb,+BAAf;IACA,MAAKC,OAAL,GAAe,MAAKA,OAA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OAAOL,cAAP;IACH;;;;;;eAIUzE,kB"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ require("../AMap/AMap.css");
4
+
5
+ require("../BMap/Map.css");
6
+
7
+ require("../GMap/Map.css");
8
+
9
+ require("../OMap/Map.css");
10
+
11
+ require("../TMap/TMap.css");
12
+
13
+ require("../OlMap/Map.css");
14
+
15
+ require("../Map.css");
16
+ //# sourceMappingURL=css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.js","names":[],"sources":["VtxMap/style/index.js"],"sourcesContent":["import '../AMap/AMap.less';\r\nimport '../BMap/Map.less';\r\nimport '../GMap/Map.less';\r\nimport '../OMap/Map.less';\r\nimport '../TMap/TMap.less';\r\nimport '../OlMap/Map.less';\r\n\r\nimport '../Map.less';"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ require("../AMap/AMap.less");
4
+
5
+ require("../BMap/Map.less");
6
+
7
+ require("../GMap/Map.less");
8
+
9
+ require("../OMap/Map.less");
10
+
11
+ require("../TMap/TMap.less");
12
+
13
+ require("../OlMap/Map.less");
14
+
15
+ require("../Map.less");
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["VtxMap/style/index.js"],"sourcesContent":["import '../AMap/AMap.less';\r\nimport '../BMap/Map.less';\r\nimport '../GMap/Map.less';\r\nimport '../OMap/Map.less';\r\nimport '../TMap/TMap.less';\r\nimport '../OlMap/Map.less';\r\n\r\nimport '../Map.less';"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA"}