@antv/l7-map 2.17.12 → 2.18.2

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 +4 -4
  2. package/es/camera.d.ts +0 -85
  3. package/es/camera.js +0 -775
  4. package/es/css/l7.css +0 -98
  5. package/es/earthmap.d.ts +0 -66
  6. package/es/earthmap.js +0 -422
  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 -29
  14. package/es/geo/mercator.js +0 -92
  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 -29
  18. package/es/geo/simple.js +0 -92
  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 -131
  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 -138
  93. package/es/hash.d.ts +0 -14
  94. package/es/hash.js +0 -156
  95. package/es/index.d.ts +0 -4
  96. package/es/index.js +0 -4
  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 -464
  101. package/es/util.d.ts +0 -25
  102. package/es/util.js +0 -101
  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 -801
  114. package/lib/css/l7.css +0 -98
  115. package/lib/earthmap.js +0 -445
  116. package/lib/geo/edge_insets.js +0 -129
  117. package/lib/geo/lng_lat.js +0 -94
  118. package/lib/geo/lng_lat_bounds.js +0 -177
  119. package/lib/geo/mercator.js +0 -121
  120. package/lib/geo/point.js +0 -239
  121. package/lib/geo/simple.js +0 -123
  122. package/lib/geo/transform.js +0 -1013
  123. package/lib/handler/IHandler.js +0 -5
  124. package/lib/handler/blockable_map_event.js +0 -92
  125. package/lib/handler/box_zoom.js +0 -217
  126. package/lib/handler/click_zoom.js +0 -67
  127. package/lib/handler/events/event.js +0 -23
  128. package/lib/handler/events/index.js +0 -31
  129. package/lib/handler/events/map_mouse_event.js +0 -87
  130. package/lib/handler/events/map_touch_event.js +0 -119
  131. package/lib/handler/events/map_wheel_event.js +0 -72
  132. package/lib/handler/events/render_event.js +0 -52
  133. package/lib/handler/handler_inertia.js +0 -193
  134. package/lib/handler/handler_manager.js +0 -714
  135. package/lib/handler/handler_util.js +0 -17
  136. package/lib/handler/keyboard.js +0 -172
  137. package/lib/handler/map_event.js +0 -140
  138. package/lib/handler/mouse/index.js +0 -31
  139. package/lib/handler/mouse/mouse_handler.js +0 -141
  140. package/lib/handler/mouse/mousepan_handler.js +0 -66
  141. package/lib/handler/mouse/mousepitch_hander.js +0 -67
  142. package/lib/handler/mouse/mouserotate_hander.js +0 -67
  143. package/lib/handler/mouse/util.js +0 -26
  144. package/lib/handler/scroll_zoom.js +0 -367
  145. package/lib/handler/shim/dblclick_zoom.js +0 -80
  146. package/lib/handler/shim/drag_pan.js +0 -105
  147. package/lib/handler/shim/drag_rotate.js +0 -88
  148. package/lib/handler/shim/touch_zoom_rotate.js +0 -139
  149. package/lib/handler/tap/single_tap_recognizer.js +0 -131
  150. package/lib/handler/tap/tap_drag_zoom.js +0 -124
  151. package/lib/handler/tap/tap_recognizer.js +0 -78
  152. package/lib/handler/tap/tap_zoom.js +0 -124
  153. package/lib/handler/touch/index.js +0 -39
  154. package/lib/handler/touch/touch_pan.js +0 -138
  155. package/lib/handler/touch/touch_pitch.js +0 -120
  156. package/lib/handler/touch/touch_rotate.js +0 -99
  157. package/lib/handler/touch/touch_zoom.js +0 -78
  158. package/lib/handler/touch/two_touch.js +0 -148
  159. package/lib/hash.js +0 -169
  160. package/lib/index.js +0 -57
  161. package/lib/interface.js +0 -5
  162. package/lib/map.js +0 -489
  163. package/lib/util.js +0 -135
  164. package/lib/utils/Aabb.js +0 -143
  165. package/lib/utils/dom.js +0 -233
  166. package/lib/utils/performance.js +0 -72
  167. package/lib/utils/primitives.js +0 -57
  168. package/lib/utils/task_queue.js +0 -115
package/lib/hash.js DELETED
@@ -1,169 +0,0 @@
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
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
-
16
- var _l7Utils = require("@antv/l7-utils");
17
-
18
- var _lodash = require("lodash");
19
-
20
- // @ts-ignore
21
- // tslint:disable-next-line:no-submodule-imports
22
-
23
- /*
24
- * Adds the map's position to its page's location hash.
25
- * Passed as an option to the map object.
26
- *
27
- * @returns {Hash} `this`
28
- */
29
- var Hash = /*#__PURE__*/function () {
30
- function Hash(hashName) {
31
- var _this = this;
32
-
33
- (0, _classCallCheck2.default)(this, Hash);
34
- (0, _defineProperty2.default)(this, "onHashChange", function () {
35
- var loc = _this.getCurrentHash();
36
-
37
- if (loc.length >= 3 && !loc.some(function (v) {
38
- return isNaN(+v);
39
- })) {
40
- var bearing = _this.map.dragRotate.isEnabled() && _this.map.touchZoomRotate.isEnabled() ? +(loc[3] || 0) : _this.map.getBearing();
41
-
42
- _this.map.jumpTo({
43
- center: [+loc[2], +loc[1]],
44
- zoom: +loc[0],
45
- bearing: bearing,
46
- pitch: +(loc[4] || 0)
47
- });
48
-
49
- return true;
50
- }
51
-
52
- return false;
53
- });
54
- (0, _defineProperty2.default)(this, "getCurrentHash", function () {
55
- // Get the current hash from location, stripped from its number sign
56
- var hash = window.location.hash.replace('#', '');
57
-
58
- if (_this.hashName) {
59
- // Split the parameter-styled hash into parts and find the value we need
60
- var keyval;
61
- hash.split('&').map(function (part) {
62
- return part.split('=');
63
- }).forEach(function (part) {
64
- if (part[0] === _this.hashName) {
65
- keyval = part;
66
- }
67
- });
68
- return (keyval ? keyval[1] || '' : '').split('/');
69
- }
70
-
71
- return hash.split('/');
72
- });
73
- (0, _defineProperty2.default)(this, "updateHashUnthrottled", function () {
74
- var hash = _this.getHashString();
75
-
76
- try {
77
- window.history.replaceState(window.history.state, '', hash);
78
- } catch (SecurityError) {// IE11 does not allow this if the page is within an iframe created
79
- // with iframe.contentWindow.document.write(...).
80
- // https://github.com/mapbox/mapbox-gl-js/issues/7410
81
- }
82
- });
83
- this.hashName = hashName && encodeURIComponent(hashName); // Mobile Safari doesn't allow updating the hash more than 100 times per 30 seconds.
84
-
85
- this.updateHash = (0, _lodash.throttle)(this.updateHashUnthrottled, 30 * 1000 / 100);
86
- }
87
-
88
- (0, _createClass2.default)(Hash, [{
89
- key: "addTo",
90
- value: function addTo(map) {
91
- this.map = map;
92
-
93
- _l7Utils.$window.addEventListener('hashchange', this.onHashChange, false);
94
-
95
- this.map.on('moveend', this.updateHash);
96
- return this;
97
- }
98
- }, {
99
- key: "remove",
100
- value: function remove() {
101
- _l7Utils.$window.removeEventListener('hashchange', this.onHashChange, false);
102
-
103
- this.map.off('moveend', this.updateHash); // clearTimeout(this.updateHash());
104
- // @ts-ignore
105
-
106
- delete this.map;
107
- return this;
108
- }
109
- }, {
110
- key: "getHashString",
111
- value: function getHashString(mapFeedback) {
112
- var center = this.map.getCenter();
113
- var zoom = Math.round(this.map.getZoom() * 100) / 100; // derived from equation: 512px * 2^z / 360 / 10^d < 0.5px
114
-
115
- var precision = Math.ceil((zoom * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10);
116
- var m = Math.pow(10, precision);
117
- var lng = Math.round(center.lng * m) / m;
118
- var lat = Math.round(center.lat * m) / m;
119
- var bearing = this.map.getBearing();
120
- var pitch = this.map.getPitch();
121
- var hash = '';
122
-
123
- if (mapFeedback) {
124
- // new map feedback site has some constraints that don't allow
125
- // us to use the same hash format as we do for the Map hash option.
126
- hash += "/".concat(lng, "/").concat(lat, "/").concat(zoom);
127
- } else {
128
- hash += "".concat(zoom, "/").concat(lat, "/").concat(lng);
129
- }
130
-
131
- if (bearing || pitch) {
132
- hash += "/".concat(Math.round(bearing * 10) / 10);
133
- }
134
-
135
- if (pitch) {
136
- hash += "/".concat(Math.round(pitch));
137
- }
138
-
139
- if (this.hashName) {
140
- var hashName = this.hashName;
141
- var found = false;
142
- var parts = window.location.hash.slice(1).split('&').map(function (part) {
143
- var key = part.split('=')[0];
144
-
145
- if (key === hashName) {
146
- found = true;
147
- return "".concat(key, "=").concat(hash);
148
- }
149
-
150
- return part;
151
- }).filter(function (a) {
152
- return a;
153
- });
154
-
155
- if (!found) {
156
- parts.push("".concat(hashName, "=").concat(hash));
157
- }
158
-
159
- return "#".concat(parts.join('&'));
160
- }
161
-
162
- return "#".concat(hash);
163
- }
164
- }]);
165
- return Hash;
166
- }();
167
-
168
- var _default = Hash;
169
- exports.default = _default;
package/lib/index.js DELETED
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _earthmap = require("./earthmap");
8
-
9
- Object.keys(_earthmap).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _earthmap[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function get() {
15
- return _earthmap[key];
16
- }
17
- });
18
- });
19
-
20
- var _mercator = require("./geo/mercator");
21
-
22
- Object.keys(_mercator).forEach(function (key) {
23
- if (key === "default" || key === "__esModule") return;
24
- if (key in exports && exports[key] === _mercator[key]) return;
25
- Object.defineProperty(exports, key, {
26
- enumerable: true,
27
- get: function get() {
28
- return _mercator[key];
29
- }
30
- });
31
- });
32
-
33
- var _interface = require("./interface");
34
-
35
- Object.keys(_interface).forEach(function (key) {
36
- if (key === "default" || key === "__esModule") return;
37
- if (key in exports && exports[key] === _interface[key]) return;
38
- Object.defineProperty(exports, key, {
39
- enumerable: true,
40
- get: function get() {
41
- return _interface[key];
42
- }
43
- });
44
- });
45
-
46
- var _map = require("./map");
47
-
48
- Object.keys(_map).forEach(function (key) {
49
- if (key === "default" || key === "__esModule") return;
50
- if (key in exports && exports[key] === _map[key]) return;
51
- Object.defineProperty(exports, key, {
52
- enumerable: true,
53
- get: function get() {
54
- return _map[key];
55
- }
56
- });
57
- });
package/lib/interface.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });