@antv/l7-map 2.9.37-alpha.2 → 2.9.37-alpha.3
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/es/camera.d.ts +84 -0
- package/es/camera.js +767 -0
- package/es/css/l7.css +98 -0
- package/es/earthmap.d.ts +66 -0
- package/es/earthmap.js +422 -0
- package/es/geo/edge_insets.d.ts +54 -0
- package/es/geo/edge_insets.js +118 -0
- package/es/geo/lng_lat.d.ts +18 -0
- package/es/geo/lng_lat.js +81 -0
- package/es/geo/lng_lat_bounds.d.ts +24 -0
- package/es/geo/lng_lat_bounds.js +167 -0
- package/es/geo/mercator.d.ts +28 -0
- package/es/geo/mercator.js +91 -0
- package/es/geo/point.d.ts +40 -0
- package/es/geo/point.js +231 -0
- package/es/geo/simple.d.ts +29 -0
- package/es/geo/simple.js +92 -0
- package/es/geo/transform.d.ts +198 -0
- package/es/geo/transform.js +971 -0
- package/es/handler/IHandler.d.ts +34 -0
- package/es/handler/IHandler.js +1 -0
- package/es/handler/blockable_map_event.d.ts +17 -0
- package/es/handler/blockable_map_event.js +83 -0
- package/es/handler/box_zoom.d.ts +59 -0
- package/es/handler/box_zoom.js +200 -0
- package/es/handler/click_zoom.d.ts +16 -0
- package/es/handler/click_zoom.js +59 -0
- package/es/handler/events/event.d.ts +4 -0
- package/es/handler/events/event.js +12 -0
- package/es/handler/events/index.d.ts +4 -0
- package/es/handler/events/index.js +4 -0
- package/es/handler/events/map_mouse_event.d.ts +34 -0
- package/es/handler/events/map_mouse_event.js +75 -0
- package/es/handler/events/map_touch_event.d.ts +57 -0
- package/es/handler/events/map_touch_event.js +105 -0
- package/es/handler/events/map_wheel_event.d.ts +33 -0
- package/es/handler/events/map_wheel_event.js +61 -0
- package/es/handler/events/render_event.d.ts +5 -0
- package/es/handler/events/render_event.js +39 -0
- package/es/handler/handler_inertia.d.ts +23 -0
- package/es/handler/handler_inertia.js +184 -0
- package/es/handler/handler_manager.d.ts +61 -0
- package/es/handler/handler_manager.js +684 -0
- package/es/handler/handler_util.d.ts +4 -0
- package/es/handler/handler_util.js +10 -0
- package/es/handler/keyboard.d.ts +36 -0
- package/es/handler/keyboard.js +162 -0
- package/es/handler/map_event.d.ts +29 -0
- package/es/handler/map_event.js +131 -0
- package/es/handler/mouse/index.d.ts +4 -0
- package/es/handler/mouse/index.js +4 -0
- package/es/handler/mouse/mouse_handler.d.ts +22 -0
- package/es/handler/mouse/mouse_handler.js +131 -0
- package/es/handler/mouse/mousepan_handler.d.ts +10 -0
- package/es/handler/mouse/mousepan_handler.js +54 -0
- package/es/handler/mouse/mousepitch_hander.d.ts +9 -0
- package/es/handler/mouse/mousepitch_hander.js +56 -0
- package/es/handler/mouse/mouserotate_hander.d.ts +9 -0
- package/es/handler/mouse/mouserotate_hander.js +56 -0
- package/es/handler/mouse/util.d.ts +6 -0
- package/es/handler/mouse/util.js +12 -0
- package/es/handler/scroll_zoom.d.ts +93 -0
- package/es/handler/scroll_zoom.js +353 -0
- package/es/handler/shim/dblclick_zoom.d.ts +40 -0
- package/es/handler/shim/dblclick_zoom.js +72 -0
- package/es/handler/shim/drag_pan.d.ts +61 -0
- package/es/handler/shim/drag_pan.js +96 -0
- package/es/handler/shim/drag_rotate.d.ts +46 -0
- package/es/handler/shim/drag_rotate.js +80 -0
- package/es/handler/shim/touch_zoom_rotate.d.ts +70 -0
- package/es/handler/shim/touch_zoom_rotate.js +130 -0
- package/es/handler/tap/single_tap_recognizer.d.ts +20 -0
- package/es/handler/tap/single_tap_recognizer.js +120 -0
- package/es/handler/tap/tap_drag_zoom.d.ts +22 -0
- package/es/handler/tap/tap_drag_zoom.js +114 -0
- package/es/handler/tap/tap_recognizer.d.ts +17 -0
- package/es/handler/tap/tap_recognizer.js +62 -0
- package/es/handler/tap/tap_zoom.d.ts +22 -0
- package/es/handler/tap/tap_zoom.js +115 -0
- package/es/handler/touch/index.d.ts +5 -0
- package/es/handler/touch/index.js +5 -0
- package/es/handler/touch/touch_pan.d.ts +30 -0
- package/es/handler/touch/touch_pan.js +128 -0
- package/es/handler/touch/touch_pitch.d.ts +13 -0
- package/es/handler/touch/touch_pitch.js +110 -0
- package/es/handler/touch/touch_rotate.d.ts +12 -0
- package/es/handler/touch/touch_rotate.js +88 -0
- package/es/handler/touch/touch_zoom.d.ts +12 -0
- package/es/handler/touch/touch_zoom.js +67 -0
- package/es/handler/touch/two_touch.d.ts +23 -0
- package/es/handler/touch/two_touch.js +138 -0
- package/es/hash.d.ts +14 -0
- package/es/hash.js +156 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/interface.d.ts +34 -0
- package/es/interface.js +1 -0
- package/es/map.d.ts +70 -0
- package/es/map.js +464 -0
- package/es/util.d.ts +18 -0
- package/es/util.js +84 -0
- package/es/utils/Aabb.d.ts +12 -0
- package/es/utils/Aabb.js +133 -0
- package/es/utils/dom.d.ts +4 -0
- package/es/utils/dom.js +218 -0
- package/es/utils/performance.d.ts +17 -0
- package/es/utils/performance.js +62 -0
- package/es/utils/primitives.d.ts +6 -0
- package/es/utils/primitives.js +45 -0
- package/es/utils/task_queue.d.ts +13 -0
- package/es/utils/task_queue.js +106 -0
- package/lib/camera.js +793 -0
- package/lib/css/l7.css +98 -0
- package/lib/earthmap.js +445 -0
- package/lib/geo/edge_insets.js +129 -0
- package/lib/geo/lng_lat.js +94 -0
- package/lib/geo/lng_lat_bounds.js +177 -0
- package/lib/geo/mercator.js +120 -0
- package/lib/geo/point.js +239 -0
- package/lib/geo/simple.js +123 -0
- package/lib/geo/transform.js +1013 -0
- package/lib/handler/IHandler.js +5 -0
- package/lib/handler/blockable_map_event.js +92 -0
- package/lib/handler/box_zoom.js +217 -0
- package/lib/handler/click_zoom.js +67 -0
- package/lib/handler/events/event.js +23 -0
- package/lib/handler/events/index.js +31 -0
- package/lib/handler/events/map_mouse_event.js +87 -0
- package/lib/handler/events/map_touch_event.js +119 -0
- package/lib/handler/events/map_wheel_event.js +72 -0
- package/lib/handler/events/render_event.js +52 -0
- package/lib/handler/handler_inertia.js +193 -0
- package/lib/handler/handler_manager.js +714 -0
- package/lib/handler/handler_util.js +17 -0
- package/lib/handler/keyboard.js +172 -0
- package/lib/handler/map_event.js +140 -0
- package/lib/handler/mouse/index.js +31 -0
- package/lib/handler/mouse/mouse_handler.js +141 -0
- package/lib/handler/mouse/mousepan_handler.js +66 -0
- package/lib/handler/mouse/mousepitch_hander.js +67 -0
- package/lib/handler/mouse/mouserotate_hander.js +67 -0
- package/lib/handler/mouse/util.js +26 -0
- package/lib/handler/scroll_zoom.js +367 -0
- package/lib/handler/shim/dblclick_zoom.js +80 -0
- package/lib/handler/shim/drag_pan.js +105 -0
- package/lib/handler/shim/drag_rotate.js +88 -0
- package/lib/handler/shim/touch_zoom_rotate.js +139 -0
- package/lib/handler/tap/single_tap_recognizer.js +131 -0
- package/lib/handler/tap/tap_drag_zoom.js +124 -0
- package/lib/handler/tap/tap_recognizer.js +78 -0
- package/lib/handler/tap/tap_zoom.js +124 -0
- package/lib/handler/touch/index.js +39 -0
- package/lib/handler/touch/touch_pan.js +138 -0
- package/lib/handler/touch/touch_pitch.js +120 -0
- package/lib/handler/touch/touch_rotate.js +99 -0
- package/lib/handler/touch/touch_zoom.js +78 -0
- package/lib/handler/touch/two_touch.js +148 -0
- package/lib/hash.js +169 -0
- package/lib/index.js +44 -0
- package/lib/interface.js +5 -0
- package/lib/map.js +489 -0
- package/lib/util.js +116 -0
- package/lib/utils/Aabb.js +143 -0
- package/lib/utils/dom.js +233 -0
- package/lib/utils/performance.js +72 -0
- package/lib/utils/primitives.js +57 -0
- package/lib/utils/task_queue.js +115 -0
- package/package.json +3 -3
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
// can't mark opaque due to https://github.com/flowtype/flow-remove-types/pull/61
|
|
21
|
+
var TaskQueue = /*#__PURE__*/function () {
|
|
22
|
+
function TaskQueue() {
|
|
23
|
+
(0, _classCallCheck2.default)(this, TaskQueue);
|
|
24
|
+
this.queue = [];
|
|
25
|
+
this.id = 0;
|
|
26
|
+
this.cleared = false;
|
|
27
|
+
this.currentlyRunning = false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
(0, _createClass2.default)(TaskQueue, [{
|
|
31
|
+
key: "add",
|
|
32
|
+
value: function add(callback) {
|
|
33
|
+
var id = ++this.id;
|
|
34
|
+
var queue = this.queue;
|
|
35
|
+
queue.push({
|
|
36
|
+
callback: callback,
|
|
37
|
+
id: id,
|
|
38
|
+
cancelled: false
|
|
39
|
+
});
|
|
40
|
+
return id;
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
key: "remove",
|
|
44
|
+
value: function remove(id) {
|
|
45
|
+
var running = this.currentlyRunning;
|
|
46
|
+
var queue = running ? this.queue.concat(running) : this.queue;
|
|
47
|
+
|
|
48
|
+
var _iterator = _createForOfIteratorHelper(queue),
|
|
49
|
+
_step;
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
53
|
+
var task = _step.value;
|
|
54
|
+
|
|
55
|
+
if (task.id === id) {
|
|
56
|
+
task.cancelled = true;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
} catch (err) {
|
|
61
|
+
_iterator.e(err);
|
|
62
|
+
} finally {
|
|
63
|
+
_iterator.f();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: "run",
|
|
68
|
+
value: function run() {
|
|
69
|
+
var timeStamp = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
70
|
+
var queue = this.currentlyRunning = this.queue; // Tasks queued by callbacks in the current queue should be executed
|
|
71
|
+
// on the next run, not the current run.
|
|
72
|
+
|
|
73
|
+
this.queue = [];
|
|
74
|
+
|
|
75
|
+
var _iterator2 = _createForOfIteratorHelper(queue),
|
|
76
|
+
_step2;
|
|
77
|
+
|
|
78
|
+
try {
|
|
79
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
80
|
+
var task = _step2.value;
|
|
81
|
+
|
|
82
|
+
if (task.cancelled) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
task.callback(timeStamp);
|
|
87
|
+
|
|
88
|
+
if (this.cleared) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator2.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator2.f();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
this.cleared = false;
|
|
99
|
+
this.currentlyRunning = false;
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "clear",
|
|
103
|
+
value: function clear() {
|
|
104
|
+
if (this.currentlyRunning) {
|
|
105
|
+
this.cleared = true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
this.queue = [];
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
return TaskQueue;
|
|
112
|
+
}();
|
|
113
|
+
|
|
114
|
+
var _default = TaskQueue;
|
|
115
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-map",
|
|
3
|
-
"version": "2.9.37-alpha.
|
|
3
|
+
"version": "2.9.37-alpha.3",
|
|
4
4
|
"description": "l7 map",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "thinkinggis <lzx199065@gmail.com>",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/antvis/L7#readme",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@antv/l7-utils": "2.9.37-alpha.
|
|
42
|
+
"@antv/l7-utils": "2.9.37-alpha.3",
|
|
43
43
|
"@babel/runtime": "^7.7.7",
|
|
44
44
|
"@mapbox/point-geometry": "^0.1.0",
|
|
45
45
|
"@mapbox/unitbezier": "^0.0.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"gl-matrix": "^3.1.0",
|
|
48
48
|
"lodash": "^4.17.15"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "92f97e637cdeb05895909006e81ba45131154bf8"
|
|
51
51
|
}
|