@antv/l7-map 2.9.24 → 2.9.26-alpha.0

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 (168) hide show
  1. package/package.json +3 -3
  2. package/es/camera.d.ts +0 -84
  3. package/es/camera.js +0 -765
  4. package/es/css/l7.css +0 -98
  5. package/es/earthmap.d.ts +0 -66
  6. package/es/earthmap.js +0 -421
  7. package/es/geo/edge_insets.d.ts +0 -54
  8. package/es/geo/edge_insets.js +0 -118
  9. package/es/geo/lng_lat.d.ts +0 -18
  10. package/es/geo/lng_lat.js +0 -81
  11. package/es/geo/lng_lat_bounds.d.ts +0 -24
  12. package/es/geo/lng_lat_bounds.js +0 -167
  13. package/es/geo/mercator.d.ts +0 -28
  14. package/es/geo/mercator.js +0 -91
  15. package/es/geo/point.d.ts +0 -40
  16. package/es/geo/point.js +0 -231
  17. package/es/geo/simple.d.ts +0 -28
  18. package/es/geo/simple.js +0 -90
  19. package/es/geo/transform.d.ts +0 -198
  20. package/es/geo/transform.js +0 -971
  21. package/es/handler/IHandler.d.ts +0 -34
  22. package/es/handler/IHandler.js +0 -1
  23. package/es/handler/blockable_map_event.d.ts +0 -17
  24. package/es/handler/blockable_map_event.js +0 -83
  25. package/es/handler/box_zoom.d.ts +0 -59
  26. package/es/handler/box_zoom.js +0 -200
  27. package/es/handler/click_zoom.d.ts +0 -16
  28. package/es/handler/click_zoom.js +0 -59
  29. package/es/handler/events/event.d.ts +0 -4
  30. package/es/handler/events/event.js +0 -12
  31. package/es/handler/events/index.d.ts +0 -4
  32. package/es/handler/events/index.js +0 -4
  33. package/es/handler/events/map_mouse_event.d.ts +0 -34
  34. package/es/handler/events/map_mouse_event.js +0 -75
  35. package/es/handler/events/map_touch_event.d.ts +0 -57
  36. package/es/handler/events/map_touch_event.js +0 -105
  37. package/es/handler/events/map_wheel_event.d.ts +0 -33
  38. package/es/handler/events/map_wheel_event.js +0 -61
  39. package/es/handler/events/render_event.d.ts +0 -5
  40. package/es/handler/events/render_event.js +0 -39
  41. package/es/handler/handler_inertia.d.ts +0 -23
  42. package/es/handler/handler_inertia.js +0 -184
  43. package/es/handler/handler_manager.d.ts +0 -61
  44. package/es/handler/handler_manager.js +0 -684
  45. package/es/handler/handler_util.d.ts +0 -4
  46. package/es/handler/handler_util.js +0 -10
  47. package/es/handler/keyboard.d.ts +0 -36
  48. package/es/handler/keyboard.js +0 -162
  49. package/es/handler/map_event.d.ts +0 -29
  50. package/es/handler/map_event.js +0 -131
  51. package/es/handler/mouse/index.d.ts +0 -4
  52. package/es/handler/mouse/index.js +0 -4
  53. package/es/handler/mouse/mouse_handler.d.ts +0 -22
  54. package/es/handler/mouse/mouse_handler.js +0 -129
  55. package/es/handler/mouse/mousepan_handler.d.ts +0 -10
  56. package/es/handler/mouse/mousepan_handler.js +0 -54
  57. package/es/handler/mouse/mousepitch_hander.d.ts +0 -9
  58. package/es/handler/mouse/mousepitch_hander.js +0 -56
  59. package/es/handler/mouse/mouserotate_hander.d.ts +0 -9
  60. package/es/handler/mouse/mouserotate_hander.js +0 -56
  61. package/es/handler/mouse/util.d.ts +0 -6
  62. package/es/handler/mouse/util.js +0 -12
  63. package/es/handler/scroll_zoom.d.ts +0 -93
  64. package/es/handler/scroll_zoom.js +0 -353
  65. package/es/handler/shim/dblclick_zoom.d.ts +0 -40
  66. package/es/handler/shim/dblclick_zoom.js +0 -72
  67. package/es/handler/shim/drag_pan.d.ts +0 -61
  68. package/es/handler/shim/drag_pan.js +0 -96
  69. package/es/handler/shim/drag_rotate.d.ts +0 -46
  70. package/es/handler/shim/drag_rotate.js +0 -80
  71. package/es/handler/shim/touch_zoom_rotate.d.ts +0 -70
  72. package/es/handler/shim/touch_zoom_rotate.js +0 -130
  73. package/es/handler/tap/single_tap_recognizer.d.ts +0 -20
  74. package/es/handler/tap/single_tap_recognizer.js +0 -120
  75. package/es/handler/tap/tap_drag_zoom.d.ts +0 -22
  76. package/es/handler/tap/tap_drag_zoom.js +0 -114
  77. package/es/handler/tap/tap_recognizer.d.ts +0 -17
  78. package/es/handler/tap/tap_recognizer.js +0 -62
  79. package/es/handler/tap/tap_zoom.d.ts +0 -22
  80. package/es/handler/tap/tap_zoom.js +0 -115
  81. package/es/handler/touch/index.d.ts +0 -5
  82. package/es/handler/touch/index.js +0 -5
  83. package/es/handler/touch/touch_pan.d.ts +0 -30
  84. package/es/handler/touch/touch_pan.js +0 -128
  85. package/es/handler/touch/touch_pitch.d.ts +0 -13
  86. package/es/handler/touch/touch_pitch.js +0 -110
  87. package/es/handler/touch/touch_rotate.d.ts +0 -12
  88. package/es/handler/touch/touch_rotate.js +0 -88
  89. package/es/handler/touch/touch_zoom.d.ts +0 -12
  90. package/es/handler/touch/touch_zoom.js +0 -67
  91. package/es/handler/touch/two_touch.d.ts +0 -23
  92. package/es/handler/touch/two_touch.js +0 -134
  93. package/es/hash.d.ts +0 -14
  94. package/es/hash.js +0 -156
  95. package/es/index.d.ts +0 -3
  96. package/es/index.js +0 -3
  97. package/es/interface.d.ts +0 -34
  98. package/es/interface.js +0 -1
  99. package/es/map.d.ts +0 -70
  100. package/es/map.js +0 -463
  101. package/es/util.d.ts +0 -18
  102. package/es/util.js +0 -84
  103. package/es/utils/Aabb.d.ts +0 -12
  104. package/es/utils/Aabb.js +0 -133
  105. package/es/utils/dom.d.ts +0 -4
  106. package/es/utils/dom.js +0 -218
  107. package/es/utils/performance.d.ts +0 -17
  108. package/es/utils/performance.js +0 -62
  109. package/es/utils/primitives.d.ts +0 -6
  110. package/es/utils/primitives.js +0 -45
  111. package/es/utils/task_queue.d.ts +0 -13
  112. package/es/utils/task_queue.js +0 -106
  113. package/lib/camera.js +0 -533
  114. package/lib/css/l7.css +0 -98
  115. package/lib/earthmap.js +0 -278
  116. package/lib/geo/edge_insets.js +0 -76
  117. package/lib/geo/lng_lat.js +0 -73
  118. package/lib/geo/lng_lat_bounds.js +0 -138
  119. package/lib/geo/mercator.js +0 -91
  120. package/lib/geo/point.js +0 -176
  121. package/lib/geo/simple.js +0 -87
  122. package/lib/geo/transform.js +0 -503
  123. package/lib/handler/IHandler.js +0 -17
  124. package/lib/handler/blockable_map_event.js +0 -71
  125. package/lib/handler/box_zoom.js +0 -139
  126. package/lib/handler/click_zoom.js +0 -59
  127. package/lib/handler/events/event.js +0 -38
  128. package/lib/handler/events/index.js +0 -38
  129. package/lib/handler/events/map_mouse_event.js +0 -44
  130. package/lib/handler/events/map_touch_event.js +0 -48
  131. package/lib/handler/events/map_wheel_event.js +0 -36
  132. package/lib/handler/events/render_event.js +0 -33
  133. package/lib/handler/handler_inertia.js +0 -149
  134. package/lib/handler/handler_manager.js +0 -455
  135. package/lib/handler/handler_util.js +0 -35
  136. package/lib/handler/keyboard.js +0 -131
  137. package/lib/handler/map_event.js +0 -91
  138. package/lib/handler/mouse/index.js +0 -38
  139. package/lib/handler/mouse/mouse_handler.js +0 -103
  140. package/lib/handler/mouse/mousepan_handler.js +0 -48
  141. package/lib/handler/mouse/mousepitch_hander.js +0 -47
  142. package/lib/handler/mouse/mouserotate_hander.js +0 -47
  143. package/lib/handler/mouse/util.js +0 -44
  144. package/lib/handler/scroll_zoom.js +0 -225
  145. package/lib/handler/shim/dblclick_zoom.js +0 -46
  146. package/lib/handler/shim/drag_pan.js +0 -55
  147. package/lib/handler/shim/drag_rotate.js +0 -49
  148. package/lib/handler/shim/touch_zoom_rotate.js +0 -71
  149. package/lib/handler/tap/single_tap_recognizer.js +0 -102
  150. package/lib/handler/tap/tap_drag_zoom.js +0 -106
  151. package/lib/handler/tap/tap_recognizer.js +0 -66
  152. package/lib/handler/tap/tap_zoom.js +0 -99
  153. package/lib/handler/touch/index.js +0 -41
  154. package/lib/handler/touch/touch_pan.js +0 -110
  155. package/lib/handler/touch/touch_pitch.js +0 -86
  156. package/lib/handler/touch/touch_rotate.js +0 -65
  157. package/lib/handler/touch/touch_zoom.js +0 -56
  158. package/lib/handler/touch/two_touch.js +0 -105
  159. package/lib/hash.js +0 -120
  160. package/lib/index.js +0 -21
  161. package/lib/interface.js +0 -17
  162. package/lib/map.js +0 -308
  163. package/lib/util.js +0 -97
  164. package/lib/utils/Aabb.js +0 -90
  165. package/lib/utils/dom.js +0 -159
  166. package/lib/utils/performance.js +0 -80
  167. package/lib/utils/primitives.js +0 -63
  168. package/lib/utils/task_queue.js +0 -72
@@ -1,80 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/performance.ts
20
- var performance_exports = {};
21
- __export(performance_exports, {
22
- PerformanceMarkers: () => PerformanceMarkers,
23
- PerformanceUtils: () => PerformanceUtils
24
- });
25
- module.exports = __toCommonJS(performance_exports);
26
- var import_l7_utils = require("@antv/l7-utils");
27
- var lastFrameTime = null;
28
- var frameTimes = [];
29
- var minFramerateTarget = 30;
30
- var frameTimeTarget = 1e3 / minFramerateTarget;
31
- var performance = import_l7_utils.$window.performance;
32
- var PerformanceMarkers = {
33
- create: "create",
34
- load: "load",
35
- fullLoad: "fullLoad"
36
- };
37
- var PerformanceUtils = {
38
- mark(marker) {
39
- performance.mark(marker);
40
- },
41
- frame(timestamp) {
42
- const currTimestamp = timestamp;
43
- if (lastFrameTime != null) {
44
- const frameTime = currTimestamp - lastFrameTime;
45
- frameTimes.push(frameTime);
46
- }
47
- lastFrameTime = currTimestamp;
48
- },
49
- clearMetrics() {
50
- lastFrameTime = null;
51
- frameTimes = [];
52
- performance.clearMeasures("loadTime");
53
- performance.clearMeasures("fullLoadTime");
54
- for (const marker in PerformanceMarkers) {
55
- performance.clearMarks(PerformanceMarkers[marker]);
56
- }
57
- },
58
- getPerformanceMetrics() {
59
- const loadTime = performance.measure("loadTime", PerformanceMarkers.create, PerformanceMarkers.load).duration;
60
- const fullLoadTime = performance.measure("fullLoadTime", PerformanceMarkers.create, PerformanceMarkers.fullLoad).duration;
61
- const totalFrames = frameTimes.length;
62
- const avgFrameTime = frameTimes.reduce((prev, curr) => prev + curr, 0) / totalFrames / 1e3;
63
- const fps = 1 / avgFrameTime;
64
- const droppedFrames = frameTimes.filter((frameTime) => frameTime > frameTimeTarget).reduce((acc, curr) => {
65
- return acc + (curr - frameTimeTarget) / frameTimeTarget;
66
- }, 0);
67
- const percentDroppedFrames = droppedFrames / (totalFrames + droppedFrames) * 100;
68
- return {
69
- loadTime,
70
- fullLoadTime,
71
- fps,
72
- percentDroppedFrames
73
- };
74
- }
75
- };
76
- // Annotate the CommonJS export names for ESM import in node:
77
- 0 && (module.exports = {
78
- PerformanceMarkers,
79
- PerformanceUtils
80
- });
@@ -1,63 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/primitives.ts
20
- var primitives_exports = {};
21
- __export(primitives_exports, {
22
- default: () => Frustum
23
- });
24
- module.exports = __toCommonJS(primitives_exports);
25
- var import_gl_matrix = require("gl-matrix");
26
- var Frustum = class {
27
- static fromInvProjectionMatrix(invProj, worldSize, zoom) {
28
- const clipSpaceCorners = [
29
- [-1, 1, -1, 1],
30
- [1, 1, -1, 1],
31
- [1, -1, -1, 1],
32
- [-1, -1, -1, 1],
33
- [-1, 1, 1, 1],
34
- [1, 1, 1, 1],
35
- [1, -1, 1, 1],
36
- [-1, -1, 1, 1]
37
- ];
38
- const scale = Math.pow(2, zoom);
39
- const frustumCoords = clipSpaceCorners.map((v) => import_gl_matrix.vec4.transformMat4(new Float32Array([]), v, invProj)).map((v) => import_gl_matrix.vec4.scale(new Float32Array([]), v, 1 / v[3] / worldSize * scale));
40
- const frustumPlanePointIndices = [
41
- [0, 1, 2],
42
- [6, 5, 4],
43
- [0, 3, 7],
44
- [2, 1, 5],
45
- [3, 2, 6],
46
- [0, 4, 5]
47
- ];
48
- const frustumPlanes = frustumPlanePointIndices.map((p) => {
49
- const a = import_gl_matrix.vec3.sub(new Float32Array(3), new Float32Array(frustumCoords[p[0]]), new Float32Array(frustumCoords[p[1]]));
50
- const b = import_gl_matrix.vec3.sub(new Float32Array(3), new Float32Array(frustumCoords[p[2]]), new Float32Array(frustumCoords[p[1]]));
51
- const n = import_gl_matrix.vec3.normalize(new Float32Array(3), import_gl_matrix.vec3.cross(new Float32Array(3), a, b));
52
- const d = -import_gl_matrix.vec3.dot(n, new Float32Array(frustumCoords[p[1]]));
53
- return n.concat(d);
54
- });
55
- return new Frustum(frustumCoords, frustumPlanes);
56
- }
57
- constructor(points, planes) {
58
- this.points = points;
59
- this.planes = planes;
60
- }
61
- };
62
- // Annotate the CommonJS export names for ESM import in node:
63
- 0 && (module.exports = {});
@@ -1,72 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/utils/task_queue.ts
20
- var task_queue_exports = {};
21
- __export(task_queue_exports, {
22
- default: () => task_queue_default
23
- });
24
- module.exports = __toCommonJS(task_queue_exports);
25
- var TaskQueue = class {
26
- constructor() {
27
- this.queue = [];
28
- this.id = 0;
29
- this.cleared = false;
30
- this.currentlyRunning = false;
31
- }
32
- add(callback) {
33
- const id = ++this.id;
34
- const queue = this.queue;
35
- queue.push({ callback, id, cancelled: false });
36
- return id;
37
- }
38
- remove(id) {
39
- const running = this.currentlyRunning;
40
- const queue = running ? this.queue.concat(running) : this.queue;
41
- for (const task of queue) {
42
- if (task.id === id) {
43
- task.cancelled = true;
44
- return;
45
- }
46
- }
47
- }
48
- run(timeStamp = 0) {
49
- const queue = this.currentlyRunning = this.queue;
50
- this.queue = [];
51
- for (const task of queue) {
52
- if (task.cancelled) {
53
- continue;
54
- }
55
- task.callback(timeStamp);
56
- if (this.cleared) {
57
- break;
58
- }
59
- }
60
- this.cleared = false;
61
- this.currentlyRunning = false;
62
- }
63
- clear() {
64
- if (this.currentlyRunning) {
65
- this.cleared = true;
66
- }
67
- this.queue = [];
68
- }
69
- };
70
- var task_queue_default = TaskQueue;
71
- // Annotate the CommonJS export names for ESM import in node:
72
- 0 && (module.exports = {});