@vtx/map 1.2.32 → 2.0.0-beta.1

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 (57) hide show
  1. package/README.md +44 -44
  2. package/lib/VtxMap/AMap/AMap.js +37 -34
  3. package/lib/VtxMap/AMap/AMap.js.map +1 -1
  4. package/lib/VtxMap/BMap/Map.js +60 -57
  5. package/lib/VtxMap/BMap/Map.js.map +1 -1
  6. package/lib/VtxMap/GMap/Map.js +36 -35
  7. package/lib/VtxMap/GMap/Map.js.map +1 -1
  8. package/lib/VtxMap/OMap/Map.js +65 -62
  9. package/lib/VtxMap/OMap/Map.js.map +1 -1
  10. package/lib/VtxMap/OMap/Map.less +70 -70
  11. package/lib/VtxMap/OlMap/Map.js +59 -54
  12. package/lib/VtxMap/OlMap/Map.js.map +1 -1
  13. package/lib/VtxMap/OlMap/Map.less +230 -230
  14. package/lib/VtxMap/TMap/TMap.js +58 -56
  15. package/lib/VtxMap/TMap/TMap.js.map +1 -1
  16. package/lib/VtxMap/index.js +0 -18
  17. package/lib/VtxMap/index.js.map +1 -1
  18. package/lib/VtxMap/optimizingPointMap.js +1 -1
  19. package/lib/VtxMap/optimizingPointMap.js.map +1 -1
  20. package/lib/VtxModal/VtxModal.css +53 -18
  21. package/lib/VtxModal/VtxModal.js +17 -13
  22. package/lib/VtxModal/VtxModal.js.map +1 -1
  23. package/lib/VtxModal/VtxModal.less +102 -52
  24. package/lib/VtxModal/style/css.js +1 -12
  25. package/lib/VtxModal/style/css.js.map +1 -1
  26. package/lib/VtxModal/style/index.js +1 -12
  27. package/lib/VtxModal/style/index.js.map +1 -1
  28. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +45 -63
  29. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +35 -36
  30. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +1 -1
  31. package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +73 -68
  32. package/lib/VtxSearchCheckMap/index.js.map +1 -1
  33. package/lib/VtxSearchCheckMap/mapping.js.map +1 -1
  34. package/lib/VtxSearchCheckMap/style/css.js +2 -18
  35. package/lib/VtxSearchCheckMap/style/css.js.map +1 -1
  36. package/lib/VtxSearchCheckMap/style/index.js +2 -18
  37. package/lib/VtxSearchCheckMap/style/index.js.map +1 -1
  38. package/lib/VtxSearchMap/VtxSearchMap.css +45 -60
  39. package/lib/VtxSearchMap/VtxSearchMap.js +33 -33
  40. package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -1
  41. package/lib/VtxSearchMap/VtxSearchMap.less +157 -174
  42. package/lib/VtxSearchMap/index.js.map +1 -1
  43. package/lib/VtxSearchMap/mapping.js.map +1 -1
  44. package/lib/VtxSearchMap/style/css.js +3 -25
  45. package/lib/VtxSearchMap/style/css.js.map +1 -1
  46. package/lib/VtxSearchMap/style/index.js +3 -25
  47. package/lib/VtxSearchMap/style/index.js.map +1 -1
  48. package/lib/default.js +37 -13
  49. package/lib/default.js.map +1 -1
  50. package/lib/utils/util.js.map +1 -1
  51. package/package.json +14 -12
  52. package/lib/VtxModal/VtxModalAntd3.css +0 -62
  53. package/lib/VtxModal/VtxModalAntd3.less +0 -67
  54. package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
  55. package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
  56. package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
  57. package/lib/VtxSearchMap/VtxSearchMapAntd3.less +0 -1
@@ -8,7 +8,8 @@ exports["default"] = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _MapToolFunction = require("../MapToolFunction");
10
10
  var _immutable = _interopRequireDefault(require("immutable"));
11
- var _default2 = _interopRequireDefault(require("../../default"));
11
+ var _default2 = _interopRequireWildcard(require("../../default"));
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
14
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
14
15
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -125,27 +126,29 @@ var Map = /*#__PURE__*/function (_React$Component) {
125
126
  value: function loadMapJs() {
126
127
  var t = this;
127
128
  this.loadMapComplete = new Promise(function (resolve, reject) {
128
- if (window.google) {
129
- resolve(t.omap = window.google.maps);
130
- } else {
131
- //&language=zh-CN
132
- //测试用地址,暂时只支持 10.10.11.227的ip
133
- $.getScript('http://ditu.google.cn/maps/api/js?key=AIzaSyAelEHQosKi09YLhXwmw3OR5ggScxOda2A&libraries=geometry,visualization,drawing', function () {
134
- var PointCollection = new Promise(function (resolve, reject) {
135
- $.getScript("".concat(_default2["default"].mapServerURL, "/GPointCollection.js"), function () {
136
- resolve();
129
+ (0, _default2.ensurejQuery)().then(function () {
130
+ if (window.google) {
131
+ resolve(t.omap = window.google.maps);
132
+ } else {
133
+ //&language=zh-CN
134
+ //测试用地址,暂时只支持 10.10.11.227的ip
135
+ $.getScript('http://ditu.google.cn/maps/api/js?key=AIzaSyAelEHQosKi09YLhXwmw3OR5ggScxOda2A&libraries=geometry,visualization,drawing', function () {
136
+ var PointCollection = new Promise(function (resolve, reject) {
137
+ $.getScript("".concat(_default2["default"].mapServerURL, "/GPointCollection.js"), function () {
138
+ resolve();
139
+ });
137
140
  });
138
- });
139
- var OmapCluster = new Promise(function (resolve, reject) {
140
- $.getScript("".concat(_default2["default"].mapServerURL, "/omapCluster.js"), function () {
141
- resolve();
141
+ var OmapCluster = new Promise(function (resolve, reject) {
142
+ $.getScript("".concat(_default2["default"].mapServerURL, "/omapCluster.js"), function () {
143
+ resolve();
144
+ });
145
+ });
146
+ Promise.all([PointCollection, OmapCluster]).then(function () {
147
+ resolve(t.omap = window.google.maps);
142
148
  });
143
149
  });
144
- Promise.all([PointCollection, OmapCluster]).then(function () {
145
- resolve(t.omap = window.google.maps);
146
- });
147
- });
148
- }
150
+ }
151
+ });
149
152
  });
150
153
  }
151
154
  //初始化地图数据
@@ -315,8 +318,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
315
318
  }
316
319
  });
317
320
  /*=================================start========================================*/
318
- /*
319
- draw对象声明, 绘制返回方法实现
321
+ /*
322
+ draw对象声明, 绘制返回方法实现
320
323
  */
321
324
  if (!t._drawmanager) {
322
325
  t._drawmanager = new google.maps.drawing.DrawingManager({
@@ -332,9 +335,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
332
335
  });
333
336
  }
334
337
  /*=================================start========================================*/
335
- /*
336
- 声明OverlayView 类
337
- 用于切换lnglat和 pixel
338
+ /*
339
+ 声明OverlayView 类
340
+ 用于切换lnglat和 pixel
338
341
  */
339
342
  function CanvasProjectionOverlay() {}
340
343
  CanvasProjectionOverlay.prototype = new google.maps.OverlayView();
@@ -345,9 +348,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
345
348
  this.canvasProjectionOverlay = new CanvasProjectionOverlay();
346
349
  this.canvasProjectionOverlay.setMap(map);
347
350
  /*=================================start========================================*/
348
- /*
349
- 重写marker对象,支持html
350
- 要使用google对象,所以在creatMap中声明
351
+ /*
352
+ 重写marker对象,支持html
353
+ 要使用google对象,所以在creatMap中声明
351
354
  */
352
355
  var MyLabel = t.MyLabel = function (map) {
353
356
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -754,7 +757,7 @@ var Map = /*#__PURE__*/function (_React$Component) {
754
757
  });
755
758
  var marker = null;
756
759
  if (item.markerContent) {
757
- /*自定义html加点
760
+ /*自定义html加点
758
761
  用Label来实现,无法再添加label(高德有判断,实现不同)*/
759
762
  //覆盖物参数
760
763
  marker = new t.MyLabel(t.state.gis, {
@@ -779,9 +782,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
779
782
  isLabel: true,
780
783
  labelClass: labelClass,
781
784
  labelContent: cg.labelContent,
782
- /*
783
- 为和百度等地图相同的参数 加上g.markerContentY值
784
- label是使用OverlayView手动实现,与marker没有关联的原因
785
+ /*
786
+ 为和百度等地图相同的参数 加上g.markerContentY值
787
+ label是使用OverlayView手动实现,与marker没有关联的原因
785
788
  */
786
789
  labelOffset: {
787
790
  x: cg.labelPixelX,
@@ -953,9 +956,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
953
956
  var oldPosition = gc.getPosition();
954
957
  //前后点位类型都是markerContent
955
958
  if (gc.isMarkerContent && gc.isMarkerContent() && item.markerContent) {
956
- /*
957
- 自定义html加点
958
- 用Label来实现,无法再添加label(高德有判断,实现不同)
959
+ /*
960
+ 自定义html加点
961
+ 用Label来实现,无法再添加label(高德有判断,实现不同)
959
962
  */
960
963
  //覆盖物参数
961
964
  gc.setOptions({
@@ -1018,9 +1021,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
1018
1021
  gc_label.setOptions({
1019
1022
  labelClass: labelClass,
1020
1023
  labelContent: cg.labelContent,
1021
- /*
1022
- 为和百度等地图相同的参数 加上g.markerContentY值
1023
- label是使用OverlayView手动实现,与marker没有关联的原因
1024
+ /*
1025
+ 为和百度等地图相同的参数 加上g.markerContentY值
1026
+ label是使用OverlayView手动实现,与marker没有关联的原因
1024
1027
  */
1025
1028
  labelOffset: {
1026
1029
  x: cg.labelPixelX,
@@ -1142,9 +1145,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
1142
1145
  gc_label.setOptions({
1143
1146
  labelClass: _labelClass,
1144
1147
  labelContent: cg.labelContent,
1145
- /*
1146
- 为和百度等地图相同的参数 加上g.markerContentY值
1147
- label是使用OverlayView手动实现,与marker没有关联的原因
1148
+ /*
1149
+ 为和百度等地图相同的参数 加上g.markerContentY值
1150
+ label是使用OverlayView手动实现,与marker没有关联的原因
1148
1151
  */
1149
1152
  labelOffset: {
1150
1153
  x: cg.labelPixelX,
@@ -2525,8 +2528,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
2525
2528
  var t = this;
2526
2529
  t._drawmanager.setDrawingMode(null);
2527
2530
  }
2528
- /*
2529
- 事件处理
2531
+ /*
2532
+ 事件处理
2530
2533
  */
2531
2534
  //点击图元事件
2532
2535
  }, {
@@ -2617,8 +2620,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
2617
2620
  t.props.mouseOutGraphic(obj);
2618
2621
  }
2619
2622
  }
2620
- /*
2621
- 地图服务功能
2623
+ /*
2624
+ 地图服务功能
2622
2625
  */
2623
2626
  //开启路况
2624
2627
  }, {
@@ -3467,9 +3470,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
3467
3470
  }
3468
3471
  return deg;
3469
3472
  }
3470
- /*
3471
- 匹配控件位置方法
3472
- (谷歌地图有8个方位,为了统一,只使用左上,左下,右上,右下)
3473
+ /*
3474
+ 匹配控件位置方法
3475
+ (谷歌地图有8个方位,为了统一,只使用左上,左下,右上,右下)
3473
3476
  */
3474
3477
  }, {
3475
3478
  key: "matchControlPosition",
@@ -3491,8 +3494,8 @@ var Map = /*#__PURE__*/function (_React$Component) {
3491
3494
  }
3492
3495
  return position;
3493
3496
  }
3494
- /*
3495
- 地图内部需要公共方法
3497
+ /*
3498
+ 地图内部需要公共方法
3496
3499
  */
3497
3500
  }, {
3498
3501
  key: "calculatePointsDistance",
@@ -3714,10 +3717,10 @@ var Map = /*#__PURE__*/function (_React$Component) {
3714
3717
  if (typeof isclearAllPointCollection == 'boolean' && isclearAllPointCollection || isclearAllPointCollection && isclearAllPointCollection !== t.props.isclearAllPointCollection) {
3715
3718
  t.clearAllPointCollection();
3716
3719
  }
3717
- /*点数据处理
3718
- pointData[2]相同的点,执行刷新
3719
- pointData[1]的数据在idsForGraphicId中不存在的,执行新增
3720
- pointData[0]数据中多余的id,执行删除
3720
+ /*点数据处理
3721
+ pointData[2]相同的点,执行刷新
3722
+ pointData[1]的数据在idsForGraphicId中不存在的,执行新增
3723
+ pointData[0]数据中多余的id,执行删除
3721
3724
  */
3722
3725
  if (mapPoints instanceof Array && props.mapPoints instanceof Array && !t.deepEqual(mapPoints, props.mapPoints)) {
3723
3726
  var oldMapPoints = props.mapPoints;
@@ -3759,9 +3762,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
3759
3762
  //更新
3760
3763
  t.updatePoint([].concat(_toConsumableArray(upds), _toConsumableArray(otherupds)));
3761
3764
  }
3762
- /*
3763
- 面数据处理
3764
- 先全删除,再新增
3765
+ /*
3766
+ 面数据处理
3767
+ 先全删除,再新增
3765
3768
  */
3766
3769
  if (mapPolygons instanceof Array && props.mapPolygons instanceof Array && !t.deepEqual(mapPolygons, props.mapPolygons)) {
3767
3770
  var oldMapPolygons = props.mapPolygons;
@@ -3802,9 +3805,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
3802
3805
  //更新
3803
3806
  t.updatePolygon([].concat(_toConsumableArray(_upds), _toConsumableArray(_otherupds)));
3804
3807
  }
3805
- /*
3806
- 圆数据处理
3807
- 先全删除,再新增
3808
+ /*
3809
+ 圆数据处理
3810
+ 先全删除,再新增
3808
3811
  */
3809
3812
  if (mapCircles instanceof Array && props.mapCircles instanceof Array && !t.deepEqual(mapCircles, props.mapCircles)) {
3810
3813
  var oldMapCircles = props.mapCircles;
@@ -3845,9 +3848,9 @@ var Map = /*#__PURE__*/function (_React$Component) {
3845
3848
  //更新
3846
3849
  t.updateCircle([].concat(_toConsumableArray(_upds2), _toConsumableArray(_otherupds2)));
3847
3850
  }
3848
- /*
3849
- 线数据处理
3850
- 先全删除,再新增
3851
+ /*
3852
+ 线数据处理
3853
+ 先全删除,再新增
3851
3854
  */
3852
3855
  if (mapLines instanceof Array && props.mapLines instanceof Array && !t.deepEqual(mapLines, props.mapLines)) {
3853
3856
  var oldMapLines = props.mapLines;