@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.
- package/README.md +44 -44
- package/lib/VtxMap/AMap/AMap.js +37 -34
- package/lib/VtxMap/AMap/AMap.js.map +1 -1
- package/lib/VtxMap/BMap/Map.js +60 -57
- package/lib/VtxMap/BMap/Map.js.map +1 -1
- package/lib/VtxMap/GMap/Map.js +36 -35
- package/lib/VtxMap/GMap/Map.js.map +1 -1
- package/lib/VtxMap/OMap/Map.js +65 -62
- package/lib/VtxMap/OMap/Map.js.map +1 -1
- package/lib/VtxMap/OMap/Map.less +70 -70
- package/lib/VtxMap/OlMap/Map.js +59 -54
- package/lib/VtxMap/OlMap/Map.js.map +1 -1
- package/lib/VtxMap/OlMap/Map.less +230 -230
- package/lib/VtxMap/TMap/TMap.js +58 -56
- package/lib/VtxMap/TMap/TMap.js.map +1 -1
- package/lib/VtxMap/index.js +0 -18
- package/lib/VtxMap/index.js.map +1 -1
- package/lib/VtxMap/optimizingPointMap.js +1 -1
- package/lib/VtxMap/optimizingPointMap.js.map +1 -1
- package/lib/VtxModal/VtxModal.css +53 -18
- package/lib/VtxModal/VtxModal.js +17 -13
- package/lib/VtxModal/VtxModal.js.map +1 -1
- package/lib/VtxModal/VtxModal.less +102 -52
- package/lib/VtxModal/style/css.js +1 -12
- package/lib/VtxModal/style/css.js.map +1 -1
- package/lib/VtxModal/style/index.js +1 -12
- package/lib/VtxModal/style/index.js.map +1 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.css +45 -63
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js +35 -36
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.js.map +1 -1
- package/lib/VtxSearchCheckMap/VtxSearchCheckMap.less +73 -68
- package/lib/VtxSearchCheckMap/index.js.map +1 -1
- package/lib/VtxSearchCheckMap/mapping.js.map +1 -1
- package/lib/VtxSearchCheckMap/style/css.js +2 -18
- package/lib/VtxSearchCheckMap/style/css.js.map +1 -1
- package/lib/VtxSearchCheckMap/style/index.js +2 -18
- package/lib/VtxSearchCheckMap/style/index.js.map +1 -1
- package/lib/VtxSearchMap/VtxSearchMap.css +45 -60
- package/lib/VtxSearchMap/VtxSearchMap.js +33 -33
- package/lib/VtxSearchMap/VtxSearchMap.js.map +1 -1
- package/lib/VtxSearchMap/VtxSearchMap.less +157 -174
- package/lib/VtxSearchMap/index.js.map +1 -1
- package/lib/VtxSearchMap/mapping.js.map +1 -1
- package/lib/VtxSearchMap/style/css.js +3 -25
- package/lib/VtxSearchMap/style/css.js.map +1 -1
- package/lib/VtxSearchMap/style/index.js +3 -25
- package/lib/VtxSearchMap/style/index.js.map +1 -1
- package/lib/default.js +37 -13
- package/lib/default.js.map +1 -1
- package/lib/utils/util.js.map +1 -1
- package/package.json +14 -12
- package/lib/VtxModal/VtxModalAntd3.css +0 -62
- package/lib/VtxModal/VtxModalAntd3.less +0 -67
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.css +0 -0
- package/lib/VtxSearchCheckMap/VtxSearchCheckMapAntd3.less +0 -1
- package/lib/VtxSearchMap/VtxSearchMapAntd3.css +0 -0
- package/lib/VtxSearchMap/VtxSearchMapAntd3.less +0 -1
package/lib/VtxMap/BMap/Map.js
CHANGED
|
@@ -9,9 +9,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _reactDom = require("react-dom");
|
|
10
10
|
var _MapToolFunction = require("../MapToolFunction");
|
|
11
11
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
12
|
-
var _unionBy = _interopRequireDefault(require("lodash/unionBy"));
|
|
13
|
-
var _default2 =
|
|
12
|
+
var _unionBy = _interopRequireDefault(require("lodash-es/unionBy"));
|
|
13
|
+
var _default2 = _interopRequireWildcard(require("../../default"));
|
|
14
14
|
var _antd = require("antd");
|
|
15
|
+
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); }
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
17
|
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; } } }; }
|
|
17
18
|
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; }
|
|
@@ -128,70 +129,70 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
128
129
|
var loadList = [];
|
|
129
130
|
if (!window.BMapLib || !window.BMapLib.DistanceTool) {
|
|
130
131
|
loadList.push(new Promise(function (resolve, reject) {
|
|
131
|
-
|
|
132
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/DistanceTool_min.js"), function () {
|
|
132
133
|
resolve();
|
|
133
134
|
});
|
|
134
135
|
}));
|
|
135
136
|
}
|
|
136
137
|
if (!window.BMapLib || !window.BMapLib.TrafficControl) {
|
|
137
138
|
loadList.push(new Promise(function (resolve, reject) {
|
|
138
|
-
|
|
139
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/TrafficControl_min.js"), function () {
|
|
139
140
|
resolve();
|
|
140
141
|
});
|
|
141
142
|
}));
|
|
142
143
|
}
|
|
143
144
|
if (!window.BMapLib || !window.BMapLib.MarkerClusterer) {
|
|
144
145
|
loadList.push(new Promise(function (resolve, reject) {
|
|
145
|
-
|
|
146
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/MarkerClusterer_min.js"), function () {
|
|
146
147
|
resolve();
|
|
147
148
|
});
|
|
148
149
|
}));
|
|
149
150
|
}
|
|
150
151
|
if (!window.BMapLib || !window.BMapLib.AreaRestriction) {
|
|
151
152
|
loadList.push(new Promise(function (resolve, reject) {
|
|
152
|
-
|
|
153
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/AreaRestriction_min.js"), function () {
|
|
153
154
|
resolve();
|
|
154
155
|
});
|
|
155
156
|
}));
|
|
156
157
|
}
|
|
157
158
|
if (!window.BMapLib || !window.BMapLib.DrawingManager) {
|
|
158
159
|
loadList.push(new Promise(function (resolve, reject) {
|
|
159
|
-
|
|
160
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/DrawingManager_min.js"), function () {
|
|
160
161
|
resolve();
|
|
161
162
|
});
|
|
162
163
|
}));
|
|
163
164
|
}
|
|
164
165
|
if (!window.BMapLib || !window.BMapLib.HeatmapOverlay) {
|
|
165
166
|
loadList.push(new Promise(function (resolve, reject) {
|
|
166
|
-
|
|
167
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/Heatmap_min.js"), function () {
|
|
167
168
|
resolve();
|
|
168
169
|
});
|
|
169
170
|
}));
|
|
170
171
|
}
|
|
171
172
|
if (!window.BMapLib || !window.BMapLib.GeoUtils) {
|
|
172
173
|
loadList.push(new Promise(function (resolve, reject) {
|
|
173
|
-
|
|
174
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/GeoUtils_min.js"), function () {
|
|
174
175
|
resolve();
|
|
175
176
|
});
|
|
176
177
|
}));
|
|
177
178
|
}
|
|
178
179
|
if (!window.BMapLib || !window.BMapLib.TextIconOverlay) {
|
|
179
180
|
loadList.push(new Promise(function (resolve, reject) {
|
|
180
|
-
|
|
181
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/TextIconOverlay_min.js"), function () {
|
|
181
182
|
resolve();
|
|
182
183
|
});
|
|
183
184
|
}));
|
|
184
185
|
}
|
|
185
186
|
if (!window.BMapLib || !window.BMapLib.InfoBox) {
|
|
186
187
|
loadList.push(new Promise(function (resolve, reject) {
|
|
187
|
-
|
|
188
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/InfoBox_min.js"), function () {
|
|
188
189
|
resolve();
|
|
189
190
|
});
|
|
190
191
|
}));
|
|
191
192
|
loadList.push();
|
|
192
193
|
}
|
|
193
194
|
loadList.push(new Promise(function (resolve, reject) {
|
|
194
|
-
|
|
195
|
+
(0, _default2.loadScript)("".concat(_default2["default"].mapServerURL, "/TextIconOverlay_min.js"), function () {
|
|
195
196
|
resolve();
|
|
196
197
|
});
|
|
197
198
|
}));
|
|
@@ -204,19 +205,21 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
204
205
|
value: function loadMapJs() {
|
|
205
206
|
var _this2 = this;
|
|
206
207
|
this.loadMapComplete = new Promise(function (resolve, reject) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
} else {
|
|
210
|
-
// EVlFc6DZzAzU5avIjoxNcFgQ
|
|
211
|
-
$.getScript(_default2["default"].bmapScriptUrl, function () {
|
|
208
|
+
(0, _default2.ensurejQuery)().then(function () {
|
|
209
|
+
if (window.BMap) {
|
|
212
210
|
resolve(_this2.loadPlugin());
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
211
|
+
} else {
|
|
212
|
+
// EVlFc6DZzAzU5avIjoxNcFgQ
|
|
213
|
+
$.getScript(_default2["default"].bmapScriptUrl, function () {
|
|
214
|
+
resolve(_this2.loadPlugin());
|
|
215
|
+
});
|
|
216
|
+
$("<link>").attr({
|
|
217
|
+
rel: "stylesheet",
|
|
218
|
+
type: "text/css",
|
|
219
|
+
href: '//api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.css'
|
|
220
|
+
}).appendTo("head");
|
|
221
|
+
}
|
|
222
|
+
});
|
|
220
223
|
});
|
|
221
224
|
}
|
|
222
225
|
//初始化地图数据
|
|
@@ -510,12 +513,12 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
510
513
|
}
|
|
511
514
|
t.initPropsForUser();
|
|
512
515
|
}
|
|
513
|
-
/*
|
|
514
|
-
切换地图矢量图和卫星图背景
|
|
515
|
-
type:
|
|
516
|
-
BMAP_NORMAL_MAP 矢量图
|
|
517
|
-
BMAP_SATELLITE_MAP 单卫星图 (暂定不用)
|
|
518
|
-
BMAP_HYBRID_MAP 卫星路况图
|
|
516
|
+
/*
|
|
517
|
+
切换地图矢量图和卫星图背景
|
|
518
|
+
type:
|
|
519
|
+
BMAP_NORMAL_MAP 矢量图
|
|
520
|
+
BMAP_SATELLITE_MAP 单卫星图 (暂定不用)
|
|
521
|
+
BMAP_HYBRID_MAP 卫星路况图
|
|
519
522
|
*/
|
|
520
523
|
}, {
|
|
521
524
|
key: "setMapType",
|
|
@@ -607,7 +610,7 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
607
610
|
var position = new BMap.Point(item.longitude, item.latitude);
|
|
608
611
|
var marker = null;
|
|
609
612
|
if (item.markerContent) {
|
|
610
|
-
/*自定义html加点
|
|
613
|
+
/*自定义html加点
|
|
611
614
|
用Label来实现,无法再添加label(高德有判断,实现不同)*/
|
|
612
615
|
//覆盖物参数
|
|
613
616
|
var markerOption = {
|
|
@@ -1686,10 +1689,10 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1686
1689
|
t.state.gis.setZoom(zoom);
|
|
1687
1690
|
}
|
|
1688
1691
|
//将制定图元展示在视野内 (强制改变地图中心位置)
|
|
1689
|
-
/*
|
|
1690
|
-
参数arg格式如下1,2
|
|
1691
|
-
1.string 格式如:'1,a,2,3,4'
|
|
1692
|
-
2.数组 ['1','2']
|
|
1692
|
+
/*
|
|
1693
|
+
参数arg格式如下1,2
|
|
1694
|
+
1.string 格式如:'1,a,2,3,4'
|
|
1695
|
+
2.数组 ['1','2']
|
|
1693
1696
|
*/
|
|
1694
1697
|
}, {
|
|
1695
1698
|
key: "setVisiblePoints",
|
|
@@ -1720,17 +1723,17 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1720
1723
|
break;
|
|
1721
1724
|
}
|
|
1722
1725
|
|
|
1723
|
-
/**
|
|
1724
|
-
* 用法
|
|
1725
|
-
* map.setVisiblePoints('lng,lat;lng,lat')
|
|
1726
|
+
/**
|
|
1727
|
+
* 用法
|
|
1728
|
+
* map.setVisiblePoints('lng,lat;lng,lat')
|
|
1726
1729
|
*/
|
|
1727
1730
|
if (typeof arg === 'string') {
|
|
1728
1731
|
ary = arg.split(',');
|
|
1729
1732
|
obj = t.getFitView(ary);
|
|
1730
1733
|
} else if (arg instanceof Array) {
|
|
1731
|
-
/**
|
|
1732
|
-
* 用法
|
|
1733
|
-
* map.setVisiblePoints([[lng,lat],[lng,lat]])
|
|
1734
|
+
/**
|
|
1735
|
+
* 用法
|
|
1736
|
+
* map.setVisiblePoints([[lng,lat],[lng,lat]])
|
|
1734
1737
|
*/
|
|
1735
1738
|
if (arg[0] instanceof Array) {
|
|
1736
1739
|
var a = [];
|
|
@@ -1738,9 +1741,9 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
1738
1741
|
a.push(new BMap.Point(arg[i][0], arg[i][1]));
|
|
1739
1742
|
}
|
|
1740
1743
|
obj = t.state.gis.getViewport(a);
|
|
1741
|
-
/**
|
|
1742
|
-
* 用法
|
|
1743
|
-
* map.setVisiblePoints(['lng,lat','lng,lat'])
|
|
1744
|
+
/**
|
|
1745
|
+
* 用法
|
|
1746
|
+
* map.setVisiblePoints(['lng,lat','lng,lat'])
|
|
1744
1747
|
*/
|
|
1745
1748
|
} else {
|
|
1746
1749
|
obj = t.getFitView(arg);
|
|
@@ -3028,10 +3031,10 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3028
3031
|
if (typeof isclearAllPointCollection == 'boolean' && isclearAllPointCollection || isclearAllPointCollection && isclearAllPointCollection !== t.props.isclearAllPointCollection) {
|
|
3029
3032
|
t.clearAllPointCollection();
|
|
3030
3033
|
}
|
|
3031
|
-
/*点数据处理
|
|
3032
|
-
pointData[2]相同的点,执行刷新
|
|
3033
|
-
pointData[1]的数据在idsForGraphicId中不存在的,执行新增
|
|
3034
|
-
pointData[0]数据中多余的id,执行删除
|
|
3034
|
+
/*点数据处理
|
|
3035
|
+
pointData[2]相同的点,执行刷新
|
|
3036
|
+
pointData[1]的数据在idsForGraphicId中不存在的,执行新增
|
|
3037
|
+
pointData[0]数据中多余的id,执行删除
|
|
3035
3038
|
*/
|
|
3036
3039
|
if (mapPoints instanceof Array && props.mapPoints instanceof Array && !t.deepEqual(mapPoints, props.mapPoints)) {
|
|
3037
3040
|
var oldMapPoints = props.mapPoints;
|
|
@@ -3073,9 +3076,9 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3073
3076
|
//更新
|
|
3074
3077
|
t.updatePoint([].concat(_toConsumableArray(upds), _toConsumableArray(otherupds)));
|
|
3075
3078
|
}
|
|
3076
|
-
/*
|
|
3077
|
-
面数据处理
|
|
3078
|
-
先全删除,再新增
|
|
3079
|
+
/*
|
|
3080
|
+
面数据处理
|
|
3081
|
+
先全删除,再新增
|
|
3079
3082
|
*/
|
|
3080
3083
|
if (mapPolygons instanceof Array && props.mapPolygons instanceof Array && !t.deepEqual(mapPolygons, props.mapPolygons)) {
|
|
3081
3084
|
var oldMapPolygons = props.mapPolygons;
|
|
@@ -3116,9 +3119,9 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3116
3119
|
//更新
|
|
3117
3120
|
t.updatePolygon([].concat(_toConsumableArray(_upds), _toConsumableArray(_otherupds)));
|
|
3118
3121
|
}
|
|
3119
|
-
/*
|
|
3120
|
-
圆数据处理
|
|
3121
|
-
先全删除,再新增
|
|
3122
|
+
/*
|
|
3123
|
+
圆数据处理
|
|
3124
|
+
先全删除,再新增
|
|
3122
3125
|
*/
|
|
3123
3126
|
if (mapCircles instanceof Array && props.mapCircles instanceof Array && !t.deepEqual(mapCircles, props.mapCircles)) {
|
|
3124
3127
|
var oldMapCircles = props.mapCircles;
|
|
@@ -3159,9 +3162,9 @@ var BaiduMap = /*#__PURE__*/function (_React$Component) {
|
|
|
3159
3162
|
//更新
|
|
3160
3163
|
t.updateCircle([].concat(_toConsumableArray(_upds2), _toConsumableArray(_otherupds2)));
|
|
3161
3164
|
}
|
|
3162
|
-
/*
|
|
3163
|
-
线数据处理
|
|
3164
|
-
先全删除,再新增
|
|
3165
|
+
/*
|
|
3166
|
+
线数据处理
|
|
3167
|
+
先全删除,再新增
|
|
3165
3168
|
*/
|
|
3166
3169
|
if (mapLines instanceof Array && props.mapLines instanceof Array && !t.deepEqual(mapLines, props.mapLines)) {
|
|
3167
3170
|
var oldMapLines = props.mapLines;
|