@antv/l7-map 2.21.11-beta.4 → 2.21.11-beta.6

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 (358) hide show
  1. package/README.md +27 -6
  2. package/es/index.d.ts +3 -4
  3. package/es/index.js +2 -4
  4. package/es/map/camera.d.ts +690 -0
  5. package/es/map/camera.js +1138 -0
  6. package/{lib → es/map}/css/l7.css +41 -7
  7. package/es/map/events.d.ts +384 -0
  8. package/es/map/events.js +222 -0
  9. package/es/map/geo/edge_insets.d.ts +97 -0
  10. package/es/{geo → map/geo}/edge_insets.js +55 -33
  11. package/es/map/geo/lng_lat.d.ts +116 -0
  12. package/es/map/geo/lng_lat.js +159 -0
  13. package/es/map/geo/lng_lat_bounds.d.ts +217 -0
  14. package/es/map/geo/lng_lat_bounds.js +334 -0
  15. package/es/map/geo/mercator_coordinate.d.ts +113 -0
  16. package/es/map/geo/mercator_coordinate.js +142 -0
  17. package/es/map/geo/transform.d.ts +262 -0
  18. package/es/map/geo/transform.js +736 -0
  19. package/{lib → es/map}/handler/box_zoom.d.ts +30 -24
  20. package/es/map/handler/box_zoom.js +145 -0
  21. package/es/map/handler/click_zoom.d.ts +24 -0
  22. package/es/map/handler/click_zoom.js +47 -0
  23. package/es/map/handler/cooperative_gestures.d.ts +40 -0
  24. package/es/map/handler/cooperative_gestures.js +94 -0
  25. package/es/map/handler/drag_handler.d.ts +88 -0
  26. package/es/map/handler/drag_handler.js +89 -0
  27. package/es/map/handler/drag_move_state_manager.d.ts +30 -0
  28. package/es/map/handler/drag_move_state_manager.js +94 -0
  29. package/es/map/handler/handler_util.d.ts +3 -0
  30. package/es/{handler → map/handler}/handler_util.js +1 -2
  31. package/es/map/handler/keyboard.d.ts +88 -0
  32. package/es/map/handler/keyboard.js +197 -0
  33. package/es/map/handler/map_event.d.ts +46 -0
  34. package/es/map/handler/map_event.js +131 -0
  35. package/es/map/handler/mouse.d.ts +30 -0
  36. package/es/map/handler/mouse.js +85 -0
  37. package/es/map/handler/one_finger_touch_drag.d.ts +15 -0
  38. package/es/map/handler/one_finger_touch_drag.js +39 -0
  39. package/es/map/handler/scroll_zoom.d.ts +102 -0
  40. package/es/map/handler/scroll_zoom.js +312 -0
  41. package/es/{handler → map/handler}/shim/dblclick_zoom.d.ts +14 -10
  42. package/es/{handler → map/handler}/shim/dblclick_zoom.js +20 -16
  43. package/es/map/handler/shim/drag_pan.d.ts +79 -0
  44. package/es/map/handler/shim/drag_pan.js +77 -0
  45. package/es/{handler → map/handler}/shim/drag_rotate.d.ts +24 -16
  46. package/es/map/handler/shim/drag_rotate.js +66 -0
  47. package/es/map/handler/shim/two_fingers_touch.d.ts +74 -0
  48. package/es/map/handler/shim/two_fingers_touch.js +106 -0
  49. package/es/map/handler/tap_drag_zoom.d.ts +28 -0
  50. package/es/map/handler/tap_drag_zoom.js +92 -0
  51. package/es/map/handler/tap_recognizer.d.ts +35 -0
  52. package/es/map/handler/tap_recognizer.js +107 -0
  53. package/es/map/handler/tap_zoom.d.ts +28 -0
  54. package/es/map/handler/tap_zoom.js +87 -0
  55. package/es/map/handler/touch_pan.d.ts +40 -0
  56. package/es/map/handler/touch_pan.js +85 -0
  57. package/es/map/handler/transform-provider.d.ts +23 -0
  58. package/es/map/handler/transform-provider.js +35 -0
  59. package/es/map/handler/two_fingers_touch.d.ts +107 -0
  60. package/es/map/handler/two_fingers_touch.js +289 -0
  61. package/es/map/handler_inertia.d.ts +20 -0
  62. package/es/{handler → map}/handler_inertia.js +36 -50
  63. package/es/map/handler_manager.d.ts +154 -0
  64. package/es/map/handler_manager.js +466 -0
  65. package/es/map/map.d.ts +625 -0
  66. package/es/map/map.js +972 -0
  67. package/es/map/util/abort_error.d.ts +15 -0
  68. package/es/map/util/abort_error.js +21 -0
  69. package/es/map/util/browser.d.ts +10 -0
  70. package/es/map/util/browser.js +30 -0
  71. package/es/map/util/dom.d.ts +30 -0
  72. package/es/map/util/dom.js +105 -0
  73. package/es/map/util/evented.d.ts +75 -0
  74. package/es/map/util/evented.js +158 -0
  75. package/es/map/util/task_queue.d.ts +18 -0
  76. package/es/map/util/task_queue.js +54 -0
  77. package/es/map/util/util.d.ts +104 -0
  78. package/es/map/util/util.js +155 -0
  79. package/lib/index.d.ts +3 -4
  80. package/lib/index.js +12 -42
  81. package/lib/map/camera.d.ts +690 -0
  82. package/lib/map/camera.js +1145 -0
  83. package/{es → lib/map}/css/l7.css +41 -7
  84. package/lib/map/events.d.ts +384 -0
  85. package/lib/map/events.js +231 -0
  86. package/lib/map/geo/edge_insets.d.ts +97 -0
  87. package/lib/{geo → map/geo}/edge_insets.js +56 -35
  88. package/lib/map/geo/lng_lat.d.ts +116 -0
  89. package/lib/map/geo/lng_lat.js +166 -0
  90. package/lib/map/geo/lng_lat_bounds.d.ts +217 -0
  91. package/lib/map/geo/lng_lat_bounds.js +341 -0
  92. package/lib/map/geo/mercator_coordinate.d.ts +113 -0
  93. package/lib/map/geo/mercator_coordinate.js +157 -0
  94. package/lib/map/geo/transform.d.ts +262 -0
  95. package/lib/map/geo/transform.js +744 -0
  96. package/{es → lib/map}/handler/box_zoom.d.ts +30 -24
  97. package/lib/map/handler/box_zoom.js +153 -0
  98. package/lib/map/handler/click_zoom.d.ts +24 -0
  99. package/lib/map/handler/click_zoom.js +54 -0
  100. package/lib/map/handler/cooperative_gestures.d.ts +40 -0
  101. package/lib/map/handler/cooperative_gestures.js +101 -0
  102. package/lib/map/handler/drag_handler.d.ts +88 -0
  103. package/lib/map/handler/drag_handler.js +97 -0
  104. package/lib/map/handler/drag_move_state_manager.d.ts +30 -0
  105. package/lib/map/handler/drag_move_state_manager.js +103 -0
  106. package/lib/map/handler/handler_util.d.ts +3 -0
  107. package/lib/{handler → map/handler}/handler_util.js +1 -2
  108. package/lib/map/handler/keyboard.d.ts +88 -0
  109. package/lib/map/handler/keyboard.js +205 -0
  110. package/lib/map/handler/map_event.d.ts +46 -0
  111. package/lib/map/handler/map_event.js +140 -0
  112. package/lib/map/handler/mouse.d.ts +30 -0
  113. package/lib/map/handler/mouse.js +93 -0
  114. package/lib/map/handler/one_finger_touch_drag.d.ts +15 -0
  115. package/lib/map/handler/one_finger_touch_drag.js +47 -0
  116. package/lib/map/handler/scroll_zoom.d.ts +102 -0
  117. package/lib/map/handler/scroll_zoom.js +320 -0
  118. package/lib/{handler → map/handler}/shim/dblclick_zoom.d.ts +14 -10
  119. package/lib/{handler → map/handler}/shim/dblclick_zoom.js +21 -17
  120. package/lib/map/handler/shim/drag_pan.d.ts +79 -0
  121. package/lib/map/handler/shim/drag_pan.js +85 -0
  122. package/lib/{handler → map/handler}/shim/drag_rotate.d.ts +24 -16
  123. package/lib/map/handler/shim/drag_rotate.js +74 -0
  124. package/lib/map/handler/shim/two_fingers_touch.d.ts +74 -0
  125. package/lib/map/handler/shim/two_fingers_touch.js +114 -0
  126. package/lib/map/handler/tap_drag_zoom.d.ts +28 -0
  127. package/lib/map/handler/tap_drag_zoom.js +99 -0
  128. package/lib/map/handler/tap_recognizer.d.ts +35 -0
  129. package/lib/map/handler/tap_recognizer.js +116 -0
  130. package/lib/map/handler/tap_zoom.d.ts +28 -0
  131. package/lib/map/handler/tap_zoom.js +94 -0
  132. package/lib/map/handler/touch_pan.d.ts +40 -0
  133. package/lib/map/handler/touch_pan.js +92 -0
  134. package/lib/map/handler/transform-provider.d.ts +23 -0
  135. package/lib/map/handler/transform-provider.js +43 -0
  136. package/lib/map/handler/two_fingers_touch.d.ts +107 -0
  137. package/lib/map/handler/two_fingers_touch.js +296 -0
  138. package/lib/map/handler_inertia.d.ts +20 -0
  139. package/lib/{handler → map}/handler_inertia.js +38 -53
  140. package/lib/map/handler_manager.d.ts +154 -0
  141. package/lib/map/handler_manager.js +474 -0
  142. package/lib/map/map.d.ts +625 -0
  143. package/lib/map/map.js +979 -0
  144. package/lib/map/util/abort_error.d.ts +15 -0
  145. package/lib/map/util/abort_error.js +29 -0
  146. package/lib/map/util/browser.d.ts +10 -0
  147. package/lib/map/util/browser.js +36 -0
  148. package/lib/map/util/dom.d.ts +30 -0
  149. package/lib/map/util/dom.js +113 -0
  150. package/lib/map/util/evented.d.ts +75 -0
  151. package/lib/map/util/evented.js +167 -0
  152. package/lib/map/util/task_queue.d.ts +18 -0
  153. package/lib/map/util/task_queue.js +62 -0
  154. package/lib/map/util/util.d.ts +104 -0
  155. package/lib/map/util/util.js +171 -0
  156. package/package.json +6 -3
  157. package/es/camera.d.ts +0 -86
  158. package/es/camera.js +0 -639
  159. package/es/earthmap.d.ts +0 -69
  160. package/es/earthmap.js +0 -445
  161. package/es/geo/edge_insets.d.ts +0 -54
  162. package/es/geo/lng_lat.d.ts +0 -18
  163. package/es/geo/lng_lat.js +0 -59
  164. package/es/geo/lng_lat_bounds.d.ts +0 -25
  165. package/es/geo/lng_lat_bounds.js +0 -118
  166. package/es/geo/mercator.d.ts +0 -30
  167. package/es/geo/mercator.js +0 -72
  168. package/es/geo/point.d.ts +0 -40
  169. package/es/geo/point.js +0 -153
  170. package/es/geo/simple.d.ts +0 -30
  171. package/es/geo/simple.js +0 -75
  172. package/es/geo/transform.d.ts +0 -198
  173. package/es/geo/transform.js +0 -895
  174. package/es/handler/IHandler.d.ts +0 -34
  175. package/es/handler/IHandler.js +0 -1
  176. package/es/handler/blockable_map_event.d.ts +0 -17
  177. package/es/handler/blockable_map_event.js +0 -58
  178. package/es/handler/box_zoom.js +0 -162
  179. package/es/handler/click_zoom.d.ts +0 -16
  180. package/es/handler/click_zoom.js +0 -40
  181. package/es/handler/events/event.d.ts +0 -4
  182. package/es/handler/events/event.js +0 -12
  183. package/es/handler/events/index.d.ts +0 -4
  184. package/es/handler/events/index.js +0 -4
  185. package/es/handler/events/map_mouse_event.d.ts +0 -34
  186. package/es/handler/events/map_mouse_event.js +0 -45
  187. package/es/handler/events/map_touch_event.d.ts +0 -57
  188. package/es/handler/events/map_touch_event.js +0 -75
  189. package/es/handler/events/map_wheel_event.d.ts +0 -33
  190. package/es/handler/events/map_wheel_event.js +0 -33
  191. package/es/handler/events/render_event.d.ts +0 -6
  192. package/es/handler/events/render_event.js +0 -10
  193. package/es/handler/handler_inertia.d.ts +0 -23
  194. package/es/handler/handler_manager.d.ts +0 -61
  195. package/es/handler/handler_manager.js +0 -487
  196. package/es/handler/handler_util.d.ts +0 -4
  197. package/es/handler/keyboard.d.ts +0 -36
  198. package/es/handler/keyboard.js +0 -131
  199. package/es/handler/map_event.d.ts +0 -29
  200. package/es/handler/map_event.js +0 -89
  201. package/es/handler/mouse/index.d.ts +0 -4
  202. package/es/handler/mouse/index.js +0 -4
  203. package/es/handler/mouse/mouse_handler.d.ts +0 -22
  204. package/es/handler/mouse/mouse_handler.js +0 -99
  205. package/es/handler/mouse/mousepan_handler.d.ts +0 -10
  206. package/es/handler/mouse/mousepan_handler.js +0 -21
  207. package/es/handler/mouse/mousepitch_hander.d.ts +0 -9
  208. package/es/handler/mouse/mousepitch_hander.js +0 -24
  209. package/es/handler/mouse/mouserotate_hander.d.ts +0 -9
  210. package/es/handler/mouse/mouserotate_hander.js +0 -24
  211. package/es/handler/mouse/util.d.ts +0 -6
  212. package/es/handler/mouse/util.js +0 -12
  213. package/es/handler/scroll_zoom.d.ts +0 -93
  214. package/es/handler/scroll_zoom.js +0 -315
  215. package/es/handler/shim/drag_pan.d.ts +0 -61
  216. package/es/handler/shim/drag_pan.js +0 -75
  217. package/es/handler/shim/drag_rotate.js +0 -64
  218. package/es/handler/shim/touch_zoom_rotate.d.ts +0 -70
  219. package/es/handler/shim/touch_zoom_rotate.js +0 -104
  220. package/es/handler/tap/single_tap_recognizer.d.ts +0 -20
  221. package/es/handler/tap/single_tap_recognizer.js +0 -77
  222. package/es/handler/tap/tap_drag_zoom.d.ts +0 -22
  223. package/es/handler/tap/tap_drag_zoom.js +0 -89
  224. package/es/handler/tap/tap_recognizer.d.ts +0 -17
  225. package/es/handler/tap/tap_recognizer.js +0 -46
  226. package/es/handler/tap/tap_zoom.d.ts +0 -22
  227. package/es/handler/tap/tap_zoom.js +0 -81
  228. package/es/handler/touch/index.d.ts +0 -5
  229. package/es/handler/touch/index.js +0 -5
  230. package/es/handler/touch/touch_pan.d.ts +0 -30
  231. package/es/handler/touch/touch_pan.js +0 -91
  232. package/es/handler/touch/touch_pitch.d.ts +0 -13
  233. package/es/handler/touch/touch_pitch.js +0 -75
  234. package/es/handler/touch/touch_rotate.d.ts +0 -12
  235. package/es/handler/touch/touch_rotate.js +0 -57
  236. package/es/handler/touch/touch_zoom.d.ts +0 -12
  237. package/es/handler/touch/touch_zoom.js +0 -37
  238. package/es/handler/touch/two_touch.d.ts +0 -23
  239. package/es/handler/touch/two_touch.js +0 -98
  240. package/es/hash.d.ts +0 -14
  241. package/es/hash.js +0 -121
  242. package/es/interface.d.ts +0 -34
  243. package/es/interface.js +0 -1
  244. package/es/map.d.ts +0 -70
  245. package/es/map.js +0 -472
  246. package/es/util.d.ts +0 -25
  247. package/es/util.js +0 -70
  248. package/es/utils/Aabb.d.ts +0 -12
  249. package/es/utils/Aabb.js +0 -72
  250. package/es/utils/dom.d.ts +0 -4
  251. package/es/utils/dom.js +0 -117
  252. package/es/utils/performance.d.ts +0 -17
  253. package/es/utils/performance.js +0 -58
  254. package/es/utils/primitives.d.ts +0 -6
  255. package/es/utils/primitives.js +0 -37
  256. package/es/utils/task_queue.d.ts +0 -13
  257. package/es/utils/task_queue.js +0 -60
  258. package/lib/camera.d.ts +0 -86
  259. package/lib/camera.js +0 -648
  260. package/lib/earthmap.d.ts +0 -69
  261. package/lib/earthmap.js +0 -451
  262. package/lib/geo/edge_insets.d.ts +0 -54
  263. package/lib/geo/lng_lat.d.ts +0 -18
  264. package/lib/geo/lng_lat.js +0 -67
  265. package/lib/geo/lng_lat_bounds.d.ts +0 -25
  266. package/lib/geo/lng_lat_bounds.js +0 -126
  267. package/lib/geo/mercator.d.ts +0 -30
  268. package/lib/geo/mercator.js +0 -88
  269. package/lib/geo/point.d.ts +0 -40
  270. package/lib/geo/point.js +0 -161
  271. package/lib/geo/simple.d.ts +0 -30
  272. package/lib/geo/simple.js +0 -92
  273. package/lib/geo/transform.d.ts +0 -198
  274. package/lib/geo/transform.js +0 -906
  275. package/lib/handler/IHandler.d.ts +0 -34
  276. package/lib/handler/IHandler.js +0 -5
  277. package/lib/handler/blockable_map_event.d.ts +0 -17
  278. package/lib/handler/blockable_map_event.js +0 -66
  279. package/lib/handler/box_zoom.js +0 -168
  280. package/lib/handler/click_zoom.d.ts +0 -16
  281. package/lib/handler/click_zoom.js +0 -48
  282. package/lib/handler/events/event.d.ts +0 -4
  283. package/lib/handler/events/event.js +0 -20
  284. package/lib/handler/events/index.d.ts +0 -4
  285. package/lib/handler/events/index.js +0 -27
  286. package/lib/handler/events/map_mouse_event.d.ts +0 -34
  287. package/lib/handler/events/map_mouse_event.js +0 -53
  288. package/lib/handler/events/map_touch_event.d.ts +0 -57
  289. package/lib/handler/events/map_touch_event.js +0 -83
  290. package/lib/handler/events/map_wheel_event.d.ts +0 -33
  291. package/lib/handler/events/map_wheel_event.js +0 -41
  292. package/lib/handler/events/render_event.d.ts +0 -6
  293. package/lib/handler/events/render_event.js +0 -18
  294. package/lib/handler/handler_inertia.d.ts +0 -23
  295. package/lib/handler/handler_manager.d.ts +0 -61
  296. package/lib/handler/handler_manager.js +0 -495
  297. package/lib/handler/handler_util.d.ts +0 -4
  298. package/lib/handler/keyboard.d.ts +0 -36
  299. package/lib/handler/keyboard.js +0 -138
  300. package/lib/handler/map_event.d.ts +0 -29
  301. package/lib/handler/map_event.js +0 -97
  302. package/lib/handler/mouse/index.d.ts +0 -4
  303. package/lib/handler/mouse/index.js +0 -27
  304. package/lib/handler/mouse/mouse_handler.d.ts +0 -22
  305. package/lib/handler/mouse/mouse_handler.js +0 -107
  306. package/lib/handler/mouse/mousepan_handler.d.ts +0 -10
  307. package/lib/handler/mouse/mousepan_handler.js +0 -29
  308. package/lib/handler/mouse/mousepitch_hander.d.ts +0 -9
  309. package/lib/handler/mouse/mousepitch_hander.js +0 -32
  310. package/lib/handler/mouse/mouserotate_hander.d.ts +0 -9
  311. package/lib/handler/mouse/mouserotate_hander.js +0 -32
  312. package/lib/handler/mouse/util.d.ts +0 -6
  313. package/lib/handler/mouse/util.js +0 -19
  314. package/lib/handler/scroll_zoom.d.ts +0 -93
  315. package/lib/handler/scroll_zoom.js +0 -322
  316. package/lib/handler/shim/drag_pan.d.ts +0 -61
  317. package/lib/handler/shim/drag_pan.js +0 -83
  318. package/lib/handler/shim/drag_rotate.js +0 -72
  319. package/lib/handler/shim/touch_zoom_rotate.d.ts +0 -70
  320. package/lib/handler/shim/touch_zoom_rotate.js +0 -112
  321. package/lib/handler/tap/single_tap_recognizer.d.ts +0 -20
  322. package/lib/handler/tap/single_tap_recognizer.js +0 -86
  323. package/lib/handler/tap/tap_drag_zoom.d.ts +0 -22
  324. package/lib/handler/tap/tap_drag_zoom.js +0 -97
  325. package/lib/handler/tap/tap_recognizer.d.ts +0 -17
  326. package/lib/handler/tap/tap_recognizer.js +0 -56
  327. package/lib/handler/tap/tap_zoom.d.ts +0 -22
  328. package/lib/handler/tap/tap_zoom.js +0 -89
  329. package/lib/handler/touch/index.d.ts +0 -5
  330. package/lib/handler/touch/index.js +0 -34
  331. package/lib/handler/touch/touch_pan.d.ts +0 -30
  332. package/lib/handler/touch/touch_pan.js +0 -100
  333. package/lib/handler/touch/touch_pitch.d.ts +0 -13
  334. package/lib/handler/touch/touch_pitch.js +0 -83
  335. package/lib/handler/touch/touch_rotate.d.ts +0 -12
  336. package/lib/handler/touch/touch_rotate.js +0 -65
  337. package/lib/handler/touch/touch_zoom.d.ts +0 -12
  338. package/lib/handler/touch/touch_zoom.js +0 -45
  339. package/lib/handler/touch/two_touch.d.ts +0 -23
  340. package/lib/handler/touch/two_touch.js +0 -106
  341. package/lib/hash.d.ts +0 -14
  342. package/lib/hash.js +0 -129
  343. package/lib/interface.d.ts +0 -34
  344. package/lib/interface.js +0 -5
  345. package/lib/map.d.ts +0 -70
  346. package/lib/map.js +0 -478
  347. package/lib/util.d.ts +0 -25
  348. package/lib/util.js +0 -89
  349. package/lib/utils/Aabb.d.ts +0 -12
  350. package/lib/utils/Aabb.js +0 -80
  351. package/lib/utils/dom.d.ts +0 -4
  352. package/lib/utils/dom.js +0 -125
  353. package/lib/utils/performance.d.ts +0 -17
  354. package/lib/utils/performance.js +0 -64
  355. package/lib/utils/primitives.d.ts +0 -6
  356. package/lib/utils/primitives.js +0 -45
  357. package/lib/utils/task_queue.d.ts +0 -13
  358. package/lib/utils/task_queue.js +0 -67
@@ -26,12 +26,7 @@
26
26
 
27
27
  .l7-canvas-container.l7-interactive,
28
28
  .l7-ctrl-group button.l7-ctrl-compass {
29
- cursor: -webkit-grab;
30
- cursor: -moz-grab;
31
29
  cursor: grab;
32
- -moz-user-select: none;
33
- -webkit-user-select: none;
34
- -ms-user-select: none;
35
30
  user-select: none;
36
31
  }
37
32
 
@@ -41,8 +36,6 @@
41
36
 
42
37
  .l7-canvas-container.l7-interactive:active,
43
38
  .l7-ctrl-group button.l7-ctrl-compass:active {
44
- cursor: -webkit-grabbing;
45
- cursor: -moz-grabbing;
46
39
  cursor: grabbing;
47
40
  }
48
41
 
@@ -61,6 +54,47 @@
61
54
  touch-action: none;
62
55
  }
63
56
 
57
+ .l7-canvas-container.l7-touch-drag-pan.l7-cooperative-gestures,
58
+ .l7-canvas-container.l7-touch-drag-pan.l7-cooperative-gestures .l7-canvas {
59
+ touch-action: pan-x pan-y;
60
+ }
61
+
62
+ .l7-cooperative-gesture-screen {
63
+ background: rgba(0 0 0 / 40%);
64
+ position: absolute;
65
+ inset: 0;
66
+ display: flex;
67
+ justify-content: center;
68
+ align-items: center;
69
+ color: white;
70
+ padding: 1rem;
71
+ font-size: 1.4em;
72
+ line-height: 1.2;
73
+ opacity: 0;
74
+ pointer-events: none;
75
+ transition: opacity 1s ease 1s;
76
+ z-index: 99999;
77
+ }
78
+
79
+ .l7-cooperative-gesture-screen.l7-show {
80
+ opacity: 1;
81
+ transition: opacity 0.05s;
82
+ }
83
+
84
+ .l7-cooperative-gesture-screen .l7-mobile-message {
85
+ display: none;
86
+ }
87
+
88
+ @media (hover: none), (width <= 480px) {
89
+ .l7-cooperative-gesture-screen .l7-desktop-message {
90
+ display: none;
91
+ }
92
+
93
+ .l7-cooperative-gesture-screen .l7-mobile-message {
94
+ display: block;
95
+ }
96
+ }
97
+
64
98
  .l7-ctrl-top-left,
65
99
  .l7-ctrl-top-right,
66
100
  .l7-ctrl-bottom-left,
@@ -0,0 +1,384 @@
1
+ /// <reference types="mapbox__point-geometry" />
2
+ import { Event } from './util/evented';
3
+ import Point from '@mapbox/point-geometry';
4
+ import type { LngLat } from './geo/lng_lat';
5
+ import type { Map } from './map';
6
+ /**
7
+ * `MapEventType` - a mapping between the event name and the event value.
8
+ * These events are used with the {@link Map#on} method.
9
+ * When using a `layerId` with {@link Map#on} method, please refer to {@link MapLayerEventType}.
10
+ * The following example can be used for all the events.
11
+ *
12
+ * @group Event Related
13
+ * @example
14
+ * ```ts
15
+ * // Initialize the map
16
+ * let map = new Map({ // map options });
17
+ * // Set an event listener
18
+ * map.on('the-event-name', () => {
19
+ * console.log('An event has occurred!');
20
+ * });
21
+ * ```
22
+ */
23
+ export type MapEventType = {
24
+ /**
25
+ * Fired when an error occurs. This is GL JS's primary error reporting
26
+ * mechanism. We use an event instead of `throw` to better accommodate
27
+ * asynchronous operations. If no listeners are bound to the `error` event, the
28
+ * error will be printed to the console.
29
+ */
30
+ error: ErrorEvent;
31
+ /**
32
+ * Fired after the last frame rendered before the map enters an
33
+ * "idle" state:
34
+ *
35
+ * - No camera transitions are in progress
36
+ * - All currently requested tiles have loaded
37
+ * - All fade/transition animations have completed
38
+ */
39
+ idle: MapLibreEvent;
40
+ /**
41
+ * Fired immediately after the map has been removed with {@link Map#remove}.
42
+ */
43
+ remove: MapLibreEvent;
44
+ /**
45
+ * Fired immediately after the map has been resized.
46
+ */
47
+ resize: MapLibreEvent;
48
+ /**
49
+ * Fired when the user cancels a "box zoom" interaction, or when the bounding box does not meet the minimum size threshold.
50
+ * See {@link BoxZoomHandler}.
51
+ */
52
+ boxzoomcancel: MapLibreZoomEvent;
53
+ /**
54
+ * Fired when a "box zoom" interaction starts. See {@link BoxZoomHandler}.
55
+ */
56
+ boxzoomstart: MapLibreZoomEvent;
57
+ /**
58
+ * Fired when a "box zoom" interaction ends. See {@link BoxZoomHandler}.
59
+ */
60
+ boxzoomend: MapLibreZoomEvent;
61
+ /**
62
+ * Fired when a [`touchcancel`](https://developer.mozilla.org/en-US/docs/Web/Events/touchcancel) event occurs within the map.
63
+ */
64
+ touchcancel: MapTouchEvent;
65
+ /**
66
+ * Fired when a [`touchmove`](https://developer.mozilla.org/en-US/docs/Web/Events/touchmove) event occurs within the map.
67
+ * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/drag-a-point/)
68
+ */
69
+ touchmove: MapTouchEvent;
70
+ /**
71
+ * Fired when a [`touchend`](https://developer.mozilla.org/en-US/docs/Web/Events/touchend) event occurs within the map.
72
+ * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/drag-a-point/)
73
+ */
74
+ touchend: MapTouchEvent;
75
+ /**
76
+ * Fired when a [`touchstart`](https://developer.mozilla.org/en-US/docs/Web/Events/touchstart) event occurs within the map.
77
+ * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/drag-a-point/)
78
+ */
79
+ touchstart: MapTouchEvent;
80
+ /**
81
+ * Fired when a pointing device (usually a mouse) is pressed and released at the same point on the map.
82
+ *
83
+ * @see [Measure distances](https://maplibre.org/maplibre-gl-js/docs/examples/measure/)
84
+ * @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js/docs/examples/center-on-symbol/)
85
+ */
86
+ click: MapMouseEvent;
87
+ /**
88
+ * Fired when the right button of the mouse is clicked or the context menu key is pressed within the map.
89
+ */
90
+ contextmenu: MapMouseEvent;
91
+ /**
92
+ * Fired when a pointing device (usually a mouse) is pressed and released twice at the same point on the map in rapid succession.
93
+ *
94
+ * **Note:** Under normal conditions, this event will be preceded by two `click` events.
95
+ */
96
+ dblclick: MapMouseEvent;
97
+ /**
98
+ * Fired when a pointing device (usually a mouse) is moved while the cursor is inside the map.
99
+ * As you move the cursor across the map, the event will fire every time the cursor changes position within the map.
100
+ *
101
+ * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/mouse-position/)
102
+ * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)
103
+ * @see [Display a popup on over](https://maplibre.org/maplibre-gl-js/docs/examples/popup-on-hover/)
104
+ */
105
+ mousemove: MapMouseEvent;
106
+ /**
107
+ * Fired when a pointing device (usually a mouse) is released within the map.
108
+ *
109
+ * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/drag-a-point/)
110
+ */
111
+ mouseup: MapMouseEvent;
112
+ /**
113
+ * Fired when a pointing device (usually a mouse) is pressed within the map.
114
+ *
115
+ * @see [Create a draggable point](https://maplibre.org/maplibre-gl-js/docs/examples/drag-a-point/)
116
+ */
117
+ mousedown: MapMouseEvent;
118
+ /**
119
+ * Fired when a point device (usually a mouse) leaves the map's canvas.
120
+ */
121
+ mouseout: MapMouseEvent;
122
+ /**
123
+ * Fired when a pointing device (usually a mouse) is moved within the map.
124
+ * As you move the cursor across a web page containing a map,
125
+ * the event will fire each time it enters the map or any child elements.
126
+ *
127
+ * @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/mouse-position/)
128
+ * @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js/docs/examples/hover-styles/)
129
+ * @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js/docs/examples/popup-on-hover/)
130
+ */
131
+ mouseover: MapMouseEvent;
132
+ /**
133
+ * Fired just before the map begins a transition from one
134
+ * view to another, as the result of either user interaction or methods such as {@link Map#jumpTo}.
135
+ *
136
+ */
137
+ movestart: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
138
+ /**
139
+ * Fired repeatedly during an animated transition from one view to
140
+ * another, as the result of either user interaction or methods such as {@link Map#flyTo}.
141
+ *
142
+ * @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)
143
+ */
144
+ move: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
145
+ /**
146
+ * Fired just after the map completes a transition from one
147
+ * view to another, as the result of either user interaction or methods such as {@link Map#jumpTo}.
148
+ *
149
+ * @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js/docs/examples/cluster-html/)
150
+ */
151
+ moveend: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
152
+ /**
153
+ * Fired just before the map begins a transition from one zoom level to another,
154
+ * as the result of either user interaction or methods such as {@link Map#flyTo}.
155
+ */
156
+ zoomstart: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
157
+ /**
158
+ * Fired repeatedly during an animated transition from one zoom level to another,
159
+ * as the result of either user interaction or methods such as {@link Map#flyTo}.
160
+ */
161
+ zoom: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
162
+ /**
163
+ * Fired just after the map completes a transition from one zoom level to another,
164
+ * as the result of either user interaction or methods such as {@link Map#flyTo}.
165
+ */
166
+ zoomend: MapLibreEvent<MouseEvent | TouchEvent | WheelEvent | undefined>;
167
+ /**
168
+ * Fired when a "drag to rotate" interaction starts. See {@link DragRotateHandler}.
169
+ */
170
+ rotatestart: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
171
+ /**
172
+ * Fired repeatedly during a "drag to rotate" interaction. See {@link DragRotateHandler}.
173
+ */
174
+ rotate: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
175
+ /**
176
+ * Fired when a "drag to rotate" interaction ends. See {@link DragRotateHandler}.
177
+ */
178
+ rotateend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
179
+ /**
180
+ * Fired when a "drag to pan" interaction starts. See {@link DragPanHandler}.
181
+ */
182
+ dragstart: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
183
+ /**
184
+ * Fired repeatedly during a "drag to pan" interaction. See {@link DragPanHandler}.
185
+ */
186
+ drag: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
187
+ /**
188
+ * Fired when a "drag to pan" interaction ends. See {@link DragPanHandler}.
189
+ * @see [Create a draggable marker](https://maplibre.org/maplibre-gl-js/docs/examples/drag-a-marker/)
190
+ */
191
+ dragend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
192
+ /**
193
+ * Fired whenever the map's pitch (tilt) begins a change as
194
+ * the result of either user interaction or methods such as {@link Map#flyTo} .
195
+ */
196
+ pitchstart: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
197
+ /**
198
+ * Fired repeatedly during the map's pitch (tilt) animation between
199
+ * one state and another as the result of either user interaction
200
+ * or methods such as {@link Map#flyTo}.
201
+ */
202
+ pitch: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
203
+ /**
204
+ * Fired immediately after the map's pitch (tilt) finishes changing as
205
+ * the result of either user interaction or methods such as {@link Map#flyTo}.
206
+ */
207
+ pitchend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
208
+ /**
209
+ * Fired when a [`wheel`](https://developer.mozilla.org/en-US/docs/Web/Events/wheel) event occurs within the map.
210
+ */
211
+ wheel: MapWheelEvent;
212
+ };
213
+ /**
214
+ * The base event for MapLibre
215
+ *
216
+ * @group Event Related
217
+ */
218
+ export type MapLibreEvent<TOrig = unknown> = {
219
+ type: keyof MapEventType;
220
+ target: Map;
221
+ originalEvent: TOrig;
222
+ };
223
+ /**
224
+ * `MapMouseEvent` is the event type for mouse-related map events.
225
+ *
226
+ * @group Event Related
227
+ *
228
+ * @example
229
+ * ```ts
230
+ * // The `click` event is an example of a `MapMouseEvent`.
231
+ * // Set up an event listener on the map.
232
+ * map.on('click', (e) => {
233
+ * // The event object (e) contains information like the
234
+ * // coordinates of the point on the map that was clicked.
235
+ * console.log('A click event has occurred at ' + e.lngLat);
236
+ * });
237
+ * ```
238
+ */
239
+ export declare class MapMouseEvent extends Event implements MapLibreEvent<MouseEvent> {
240
+ /**
241
+ * The event type
242
+ */
243
+ type: 'mousedown' | 'mouseup' | 'click' | 'dblclick' | 'mousemove' | 'mouseover' | 'mouseout' | 'contextmenu';
244
+ /**
245
+ * The `Map` object that fired the event.
246
+ */
247
+ target: Map;
248
+ /**
249
+ * The DOM event which caused the map event.
250
+ */
251
+ originalEvent: MouseEvent;
252
+ /**
253
+ * The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.
254
+ */
255
+ point: Point;
256
+ /**
257
+ * The geographic location on the map of the mouse cursor.
258
+ */
259
+ lngLat: LngLat;
260
+ /**
261
+ * Prevents subsequent default processing of the event by the map.
262
+ *
263
+ * Calling this method will prevent the following default map behaviors:
264
+ *
265
+ * * On `mousedown` events, the behavior of {@link DragPanHandler}
266
+ * * On `mousedown` events, the behavior of {@link DragRotateHandler}
267
+ * * On `mousedown` events, the behavior of {@link BoxZoomHandler}
268
+ * * On `dblclick` events, the behavior of {@link DoubleClickZoomHandler}
269
+ *
270
+ */
271
+ preventDefault(): void;
272
+ /**
273
+ * `true` if `preventDefault` has been called.
274
+ */
275
+ get defaultPrevented(): boolean;
276
+ _defaultPrevented: boolean;
277
+ constructor(type: string, map: Map, originalEvent: MouseEvent, data?: any);
278
+ }
279
+ /**
280
+ * `MapTouchEvent` is the event type for touch-related map events.
281
+ *
282
+ * @group Event Related
283
+ */
284
+ export declare class MapTouchEvent extends Event implements MapLibreEvent<TouchEvent> {
285
+ /**
286
+ * The event type.
287
+ */
288
+ type: 'touchstart' | 'touchmove' | 'touchend' | 'touchcancel';
289
+ /**
290
+ * The `Map` object that fired the event.
291
+ */
292
+ target: Map;
293
+ /**
294
+ * The DOM event which caused the map event.
295
+ */
296
+ originalEvent: TouchEvent;
297
+ /**
298
+ * The geographic location on the map of the center of the touch event points.
299
+ */
300
+ lngLat: LngLat;
301
+ /**
302
+ * The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left
303
+ * corner.
304
+ */
305
+ point: Point;
306
+ /**
307
+ * The array of pixel coordinates corresponding to a
308
+ * [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
309
+ */
310
+ points: Array<Point>;
311
+ /**
312
+ * The geographical locations on the map corresponding to a
313
+ * [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
314
+ */
315
+ lngLats: Array<LngLat>;
316
+ /**
317
+ * Prevents subsequent default processing of the event by the map.
318
+ *
319
+ * Calling this method will prevent the following default map behaviors:
320
+ *
321
+ * * On `touchstart` events, the behavior of {@link DragPanHandler}
322
+ * * On `touchstart` events, the behavior of {@link TwoFingersTouchZoomRotateHandler}
323
+ *
324
+ */
325
+ preventDefault(): void;
326
+ /**
327
+ * `true` if `preventDefault` has been called.
328
+ */
329
+ get defaultPrevented(): boolean;
330
+ _defaultPrevented: boolean;
331
+ constructor(type: string, map: Map, originalEvent: TouchEvent);
332
+ }
333
+ /**
334
+ * `MapWheelEvent` is the event type for the `wheel` map event.
335
+ *
336
+ * @group Event Related
337
+ *
338
+ */
339
+ export declare class MapWheelEvent extends Event {
340
+ /**
341
+ * The event type
342
+ */
343
+ type: 'wheel';
344
+ /**
345
+ * The `Map` object that fired the event.
346
+ */
347
+ target: Map;
348
+ /**
349
+ * The DOM event which caused the map event.
350
+ */
351
+ originalEvent: WheelEvent;
352
+ /**
353
+ * Prevents subsequent default processing of the event by the map.
354
+ *
355
+ * Calling this method will prevent the behavior of {@link ScrollZoomHandler}.
356
+ */
357
+ preventDefault(): void;
358
+ /**
359
+ * `true` if `preventDefault` has been called.
360
+ */
361
+ get defaultPrevented(): boolean;
362
+ _defaultPrevented: boolean;
363
+ /** */
364
+ constructor(type: string, map: Map, originalEvent: WheelEvent);
365
+ }
366
+ /**
367
+ * A `MapLibreZoomEvent` is the event type for the boxzoom-related map events emitted by the {@link BoxZoomHandler}.
368
+ *
369
+ * @group Event Related
370
+ */
371
+ export type MapLibreZoomEvent = {
372
+ /**
373
+ * The type of boxzoom event. One of `boxzoomstart`, `boxzoomend` or `boxzoomcancel`
374
+ */
375
+ type: 'boxzoomstart' | 'boxzoomend' | 'boxzoomcancel';
376
+ /**
377
+ * The `Map` instance that triggered the event
378
+ */
379
+ target: Map;
380
+ /**
381
+ * The DOM event that triggered the boxzoom event. Can be a `MouseEvent` or `KeyboardEvent`
382
+ */
383
+ originalEvent: MouseEvent;
384
+ };
@@ -0,0 +1,222 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import { Event } from "./util/evented";
3
+ import Point from '@mapbox/point-geometry';
4
+ import { DOM } from "./util/dom";
5
+
6
+ /**
7
+ * `MapEventType` - a mapping between the event name and the event value.
8
+ * These events are used with the {@link Map#on} method.
9
+ * When using a `layerId` with {@link Map#on} method, please refer to {@link MapLayerEventType}.
10
+ * The following example can be used for all the events.
11
+ *
12
+ * @group Event Related
13
+ * @example
14
+ * ```ts
15
+ * // Initialize the map
16
+ * let map = new Map({ // map options });
17
+ * // Set an event listener
18
+ * map.on('the-event-name', () => {
19
+ * console.log('An event has occurred!');
20
+ * });
21
+ * ```
22
+ */
23
+
24
+ /**
25
+ * The base event for MapLibre
26
+ *
27
+ * @group Event Related
28
+ */
29
+
30
+ /**
31
+ * `MapMouseEvent` is the event type for mouse-related map events.
32
+ *
33
+ * @group Event Related
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * // The `click` event is an example of a `MapMouseEvent`.
38
+ * // Set up an event listener on the map.
39
+ * map.on('click', (e) => {
40
+ * // The event object (e) contains information like the
41
+ * // coordinates of the point on the map that was clicked.
42
+ * console.log('A click event has occurred at ' + e.lngLat);
43
+ * });
44
+ * ```
45
+ */
46
+ export class MapMouseEvent extends Event {
47
+ /**
48
+ * Prevents subsequent default processing of the event by the map.
49
+ *
50
+ * Calling this method will prevent the following default map behaviors:
51
+ *
52
+ * * On `mousedown` events, the behavior of {@link DragPanHandler}
53
+ * * On `mousedown` events, the behavior of {@link DragRotateHandler}
54
+ * * On `mousedown` events, the behavior of {@link BoxZoomHandler}
55
+ * * On `dblclick` events, the behavior of {@link DoubleClickZoomHandler}
56
+ *
57
+ */
58
+ preventDefault() {
59
+ this._defaultPrevented = true;
60
+ }
61
+
62
+ /**
63
+ * `true` if `preventDefault` has been called.
64
+ */
65
+ get defaultPrevented() {
66
+ return this._defaultPrevented;
67
+ }
68
+ constructor(type, map, originalEvent, data = {}) {
69
+ super(type, data);
70
+ /**
71
+ * The event type
72
+ */
73
+ /**
74
+ * The `Map` object that fired the event.
75
+ */
76
+ _defineProperty(this, "target", void 0);
77
+ /**
78
+ * The DOM event which caused the map event.
79
+ */
80
+ _defineProperty(this, "originalEvent", void 0);
81
+ /**
82
+ * The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.
83
+ */
84
+ _defineProperty(this, "point", void 0);
85
+ /**
86
+ * The geographic location on the map of the mouse cursor.
87
+ */
88
+ _defineProperty(this, "lngLat", void 0);
89
+ _defineProperty(this, "_defaultPrevented", void 0);
90
+ const point = DOM.mousePos(map.getCanvasContainer(), originalEvent);
91
+ const lngLat = map.unproject(point);
92
+ this.point = point;
93
+ this.lngLat = lngLat;
94
+ this.originalEvent = originalEvent;
95
+ this._defaultPrevented = false;
96
+ this.target = map;
97
+ }
98
+ }
99
+
100
+ /**
101
+ * `MapTouchEvent` is the event type for touch-related map events.
102
+ *
103
+ * @group Event Related
104
+ */
105
+ export class MapTouchEvent extends Event {
106
+ /**
107
+ * Prevents subsequent default processing of the event by the map.
108
+ *
109
+ * Calling this method will prevent the following default map behaviors:
110
+ *
111
+ * * On `touchstart` events, the behavior of {@link DragPanHandler}
112
+ * * On `touchstart` events, the behavior of {@link TwoFingersTouchZoomRotateHandler}
113
+ *
114
+ */
115
+ preventDefault() {
116
+ this._defaultPrevented = true;
117
+ }
118
+
119
+ /**
120
+ * `true` if `preventDefault` has been called.
121
+ */
122
+ get defaultPrevented() {
123
+ return this._defaultPrevented;
124
+ }
125
+ constructor(type, map, originalEvent) {
126
+ super(type);
127
+ /**
128
+ * The event type.
129
+ */
130
+ /**
131
+ * The `Map` object that fired the event.
132
+ */
133
+ _defineProperty(this, "target", void 0);
134
+ /**
135
+ * The DOM event which caused the map event.
136
+ */
137
+ _defineProperty(this, "originalEvent", void 0);
138
+ /**
139
+ * The geographic location on the map of the center of the touch event points.
140
+ */
141
+ _defineProperty(this, "lngLat", void 0);
142
+ /**
143
+ * The pixel coordinates of the center of the touch event points, relative to the map and measured from the top left
144
+ * corner.
145
+ */
146
+ _defineProperty(this, "point", void 0);
147
+ /**
148
+ * The array of pixel coordinates corresponding to a
149
+ * [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
150
+ */
151
+ _defineProperty(this, "points", void 0);
152
+ /**
153
+ * The geographical locations on the map corresponding to a
154
+ * [touch event's `touches`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/touches) property.
155
+ */
156
+ _defineProperty(this, "lngLats", void 0);
157
+ _defineProperty(this, "_defaultPrevented", void 0);
158
+ const touches = type === 'touchend' ? originalEvent.changedTouches : originalEvent.touches;
159
+ const points = DOM.touchPos(map.getCanvasContainer(), touches);
160
+ const lngLats = points.map(t => map.unproject(t));
161
+ const point = points.reduce((prev, curr, i, arr) => {
162
+ return prev.add(curr.div(arr.length));
163
+ }, new Point(0, 0));
164
+ const lngLat = map.unproject(point);
165
+ this.target = map;
166
+ this.points = points;
167
+ this.point = point;
168
+ this.lngLats = lngLats;
169
+ this.lngLat = lngLat;
170
+ this.originalEvent = originalEvent;
171
+ this._defaultPrevented = false;
172
+ }
173
+ }
174
+
175
+ /**
176
+ * `MapWheelEvent` is the event type for the `wheel` map event.
177
+ *
178
+ * @group Event Related
179
+ *
180
+ */
181
+ export class MapWheelEvent extends Event {
182
+ /**
183
+ * Prevents subsequent default processing of the event by the map.
184
+ *
185
+ * Calling this method will prevent the behavior of {@link ScrollZoomHandler}.
186
+ */
187
+ preventDefault() {
188
+ this._defaultPrevented = true;
189
+ }
190
+
191
+ /**
192
+ * `true` if `preventDefault` has been called.
193
+ */
194
+ get defaultPrevented() {
195
+ return this._defaultPrevented;
196
+ }
197
+ /** */
198
+ constructor(type, map, originalEvent) {
199
+ super(type);
200
+ /**
201
+ * The event type
202
+ */
203
+ /**
204
+ * The `Map` object that fired the event.
205
+ */
206
+ _defineProperty(this, "target", void 0);
207
+ /**
208
+ * The DOM event which caused the map event.
209
+ */
210
+ _defineProperty(this, "originalEvent", void 0);
211
+ _defineProperty(this, "_defaultPrevented", void 0);
212
+ this.target = map;
213
+ this._defaultPrevented = false;
214
+ this.originalEvent = originalEvent;
215
+ }
216
+ }
217
+
218
+ /**
219
+ * A `MapLibreZoomEvent` is the event type for the boxzoom-related map events emitted by the {@link BoxZoomHandler}.
220
+ *
221
+ * @group Event Related
222
+ */