@antv/l7-map 2.25.5 → 2.25.7

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 (159) hide show
  1. package/package.json +2 -2
  2. package/es/index.d.ts +0 -5
  3. package/es/index.js +0 -4
  4. package/es/map/camera.d.ts +0 -690
  5. package/es/map/camera.js +0 -1138
  6. package/es/map/css/l7.css +0 -171
  7. package/es/map/events.d.ts +0 -384
  8. package/es/map/events.js +0 -231
  9. package/es/map/geo/edge_insets.d.ts +0 -97
  10. package/es/map/geo/edge_insets.js +0 -115
  11. package/es/map/geo/lng_lat.d.ts +0 -116
  12. package/es/map/geo/lng_lat.js +0 -159
  13. package/es/map/geo/lng_lat_bounds.d.ts +0 -217
  14. package/es/map/geo/lng_lat_bounds.js +0 -334
  15. package/es/map/geo/mercator_coordinate.d.ts +0 -113
  16. package/es/map/geo/mercator_coordinate.js +0 -142
  17. package/es/map/geo/transform.d.ts +0 -262
  18. package/es/map/geo/transform.js +0 -736
  19. package/es/map/handler/box_zoom.d.ts +0 -65
  20. package/es/map/handler/box_zoom.js +0 -145
  21. package/es/map/handler/click_zoom.d.ts +0 -24
  22. package/es/map/handler/click_zoom.js +0 -47
  23. package/es/map/handler/cooperative_gestures.d.ts +0 -40
  24. package/es/map/handler/cooperative_gestures.js +0 -94
  25. package/es/map/handler/drag_handler.d.ts +0 -88
  26. package/es/map/handler/drag_handler.js +0 -89
  27. package/es/map/handler/drag_move_state_manager.d.ts +0 -30
  28. package/es/map/handler/drag_move_state_manager.js +0 -94
  29. package/es/map/handler/handler_util.d.ts +0 -3
  30. package/es/map/handler/handler_util.js +0 -8
  31. package/es/map/handler/keyboard.d.ts +0 -88
  32. package/es/map/handler/keyboard.js +0 -197
  33. package/es/map/handler/map_event.d.ts +0 -46
  34. package/es/map/handler/map_event.js +0 -131
  35. package/es/map/handler/mouse.d.ts +0 -30
  36. package/es/map/handler/mouse.js +0 -85
  37. package/es/map/handler/one_finger_touch_drag.d.ts +0 -15
  38. package/es/map/handler/one_finger_touch_drag.js +0 -39
  39. package/es/map/handler/scroll_zoom.d.ts +0 -102
  40. package/es/map/handler/scroll_zoom.js +0 -312
  41. package/es/map/handler/shim/dblclick_zoom.d.ts +0 -44
  42. package/es/map/handler/shim/dblclick_zoom.js +0 -60
  43. package/es/map/handler/shim/drag_pan.d.ts +0 -79
  44. package/es/map/handler/shim/drag_pan.js +0 -77
  45. package/es/map/handler/shim/drag_rotate.d.ts +0 -54
  46. package/es/map/handler/shim/drag_rotate.js +0 -66
  47. package/es/map/handler/shim/two_fingers_touch.d.ts +0 -74
  48. package/es/map/handler/shim/two_fingers_touch.js +0 -106
  49. package/es/map/handler/tap_drag_zoom.d.ts +0 -28
  50. package/es/map/handler/tap_drag_zoom.js +0 -92
  51. package/es/map/handler/tap_recognizer.d.ts +0 -35
  52. package/es/map/handler/tap_recognizer.js +0 -107
  53. package/es/map/handler/tap_zoom.d.ts +0 -28
  54. package/es/map/handler/tap_zoom.js +0 -87
  55. package/es/map/handler/touch_pan.d.ts +0 -40
  56. package/es/map/handler/touch_pan.js +0 -85
  57. package/es/map/handler/transform-provider.d.ts +0 -23
  58. package/es/map/handler/transform-provider.js +0 -35
  59. package/es/map/handler/two_fingers_touch.d.ts +0 -107
  60. package/es/map/handler/two_fingers_touch.js +0 -289
  61. package/es/map/handler_inertia.d.ts +0 -20
  62. package/es/map/handler_inertia.js +0 -128
  63. package/es/map/handler_manager.d.ts +0 -154
  64. package/es/map/handler_manager.js +0 -466
  65. package/es/map/map.d.ts +0 -637
  66. package/es/map/map.js +0 -984
  67. package/es/map/util/abort_error.d.ts +0 -15
  68. package/es/map/util/abort_error.js +0 -21
  69. package/es/map/util/browser.d.ts +0 -10
  70. package/es/map/util/browser.js +0 -30
  71. package/es/map/util/dom.d.ts +0 -30
  72. package/es/map/util/dom.js +0 -105
  73. package/es/map/util/evented.d.ts +0 -75
  74. package/es/map/util/evented.js +0 -158
  75. package/es/map/util/simpleMapCoord.d.ts +0 -31
  76. package/es/map/util/simpleMapCoord.js +0 -54
  77. package/es/map/util/task_queue.d.ts +0 -18
  78. package/es/map/util/task_queue.js +0 -54
  79. package/es/map/util/util.d.ts +0 -104
  80. package/es/map/util/util.js +0 -155
  81. package/lib/index.d.ts +0 -5
  82. package/lib/index.js +0 -33
  83. package/lib/map/camera.d.ts +0 -690
  84. package/lib/map/camera.js +0 -1145
  85. package/lib/map/css/l7.css +0 -171
  86. package/lib/map/events.d.ts +0 -384
  87. package/lib/map/events.js +0 -240
  88. package/lib/map/geo/edge_insets.d.ts +0 -97
  89. package/lib/map/geo/edge_insets.js +0 -122
  90. package/lib/map/geo/lng_lat.d.ts +0 -116
  91. package/lib/map/geo/lng_lat.js +0 -166
  92. package/lib/map/geo/lng_lat_bounds.d.ts +0 -217
  93. package/lib/map/geo/lng_lat_bounds.js +0 -341
  94. package/lib/map/geo/mercator_coordinate.d.ts +0 -113
  95. package/lib/map/geo/mercator_coordinate.js +0 -157
  96. package/lib/map/geo/transform.d.ts +0 -262
  97. package/lib/map/geo/transform.js +0 -744
  98. package/lib/map/handler/box_zoom.d.ts +0 -65
  99. package/lib/map/handler/box_zoom.js +0 -153
  100. package/lib/map/handler/click_zoom.d.ts +0 -24
  101. package/lib/map/handler/click_zoom.js +0 -54
  102. package/lib/map/handler/cooperative_gestures.d.ts +0 -40
  103. package/lib/map/handler/cooperative_gestures.js +0 -101
  104. package/lib/map/handler/drag_handler.d.ts +0 -88
  105. package/lib/map/handler/drag_handler.js +0 -97
  106. package/lib/map/handler/drag_move_state_manager.d.ts +0 -30
  107. package/lib/map/handler/drag_move_state_manager.js +0 -103
  108. package/lib/map/handler/handler_util.d.ts +0 -3
  109. package/lib/map/handler/handler_util.js +0 -14
  110. package/lib/map/handler/keyboard.d.ts +0 -88
  111. package/lib/map/handler/keyboard.js +0 -205
  112. package/lib/map/handler/map_event.d.ts +0 -46
  113. package/lib/map/handler/map_event.js +0 -140
  114. package/lib/map/handler/mouse.d.ts +0 -30
  115. package/lib/map/handler/mouse.js +0 -93
  116. package/lib/map/handler/one_finger_touch_drag.d.ts +0 -15
  117. package/lib/map/handler/one_finger_touch_drag.js +0 -47
  118. package/lib/map/handler/scroll_zoom.d.ts +0 -102
  119. package/lib/map/handler/scroll_zoom.js +0 -320
  120. package/lib/map/handler/shim/dblclick_zoom.d.ts +0 -44
  121. package/lib/map/handler/shim/dblclick_zoom.js +0 -68
  122. package/lib/map/handler/shim/drag_pan.d.ts +0 -79
  123. package/lib/map/handler/shim/drag_pan.js +0 -85
  124. package/lib/map/handler/shim/drag_rotate.d.ts +0 -54
  125. package/lib/map/handler/shim/drag_rotate.js +0 -74
  126. package/lib/map/handler/shim/two_fingers_touch.d.ts +0 -74
  127. package/lib/map/handler/shim/two_fingers_touch.js +0 -114
  128. package/lib/map/handler/tap_drag_zoom.d.ts +0 -28
  129. package/lib/map/handler/tap_drag_zoom.js +0 -99
  130. package/lib/map/handler/tap_recognizer.d.ts +0 -35
  131. package/lib/map/handler/tap_recognizer.js +0 -116
  132. package/lib/map/handler/tap_zoom.d.ts +0 -28
  133. package/lib/map/handler/tap_zoom.js +0 -94
  134. package/lib/map/handler/touch_pan.d.ts +0 -40
  135. package/lib/map/handler/touch_pan.js +0 -92
  136. package/lib/map/handler/transform-provider.d.ts +0 -23
  137. package/lib/map/handler/transform-provider.js +0 -43
  138. package/lib/map/handler/two_fingers_touch.d.ts +0 -107
  139. package/lib/map/handler/two_fingers_touch.js +0 -296
  140. package/lib/map/handler_inertia.d.ts +0 -20
  141. package/lib/map/handler_inertia.js +0 -136
  142. package/lib/map/handler_manager.d.ts +0 -154
  143. package/lib/map/handler_manager.js +0 -474
  144. package/lib/map/map.d.ts +0 -637
  145. package/lib/map/map.js +0 -991
  146. package/lib/map/util/abort_error.d.ts +0 -15
  147. package/lib/map/util/abort_error.js +0 -29
  148. package/lib/map/util/browser.d.ts +0 -10
  149. package/lib/map/util/browser.js +0 -36
  150. package/lib/map/util/dom.d.ts +0 -30
  151. package/lib/map/util/dom.js +0 -113
  152. package/lib/map/util/evented.d.ts +0 -75
  153. package/lib/map/util/evented.js +0 -167
  154. package/lib/map/util/simpleMapCoord.d.ts +0 -31
  155. package/lib/map/util/simpleMapCoord.js +0 -62
  156. package/lib/map/util/task_queue.d.ts +0 -18
  157. package/lib/map/util/task_queue.js +0 -62
  158. package/lib/map/util/util.d.ts +0 -104
  159. package/lib/map/util/util.js +0 -171
package/es/map/css/l7.css DELETED
@@ -1,171 +0,0 @@
1
- .l7-map {
2
- font:
3
- 12px/20px 'Helvetica Neue',
4
- Arial,
5
- Helvetica,
6
- sans-serif;
7
- overflow: hidden;
8
- position: relative;
9
- -webkit-tap-highlight-color: rgb(0 0 0 / 0%);
10
- }
11
-
12
- .l7-canvas {
13
- position: absolute;
14
- left: 0;
15
- top: 0;
16
- }
17
-
18
- .l7-map:full-screen {
19
- width: 100%;
20
- height: 100%;
21
- }
22
-
23
- .l7-canary {
24
- background-color: salmon;
25
- }
26
-
27
- .l7-canvas-container.l7-interactive,
28
- .l7-ctrl-group button.l7-ctrl-compass {
29
- cursor: grab;
30
- user-select: none;
31
- }
32
-
33
- .l7-canvas-container.l7-interactive.l7-track-pointer {
34
- cursor: pointer;
35
- }
36
-
37
- .l7-canvas-container.l7-interactive:active,
38
- .l7-ctrl-group button.l7-ctrl-compass:active {
39
- cursor: grabbing;
40
- }
41
-
42
- .l7-canvas-container.l7-touch-zoom-rotate,
43
- .l7-canvas-container.l7-touch-zoom-rotate .l7-canvas {
44
- touch-action: pan-x pan-y;
45
- }
46
-
47
- .l7-canvas-container.l7-touch-drag-pan,
48
- .l7-canvas-container.l7-touch-drag-pan .l7-canvas {
49
- touch-action: pinch-zoom;
50
- }
51
-
52
- .l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan,
53
- .l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas {
54
- touch-action: none;
55
- }
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
-
98
- .l7-ctrl-top-left,
99
- .l7-ctrl-top-right,
100
- .l7-ctrl-bottom-left,
101
- .l7-ctrl-bottom-right {
102
- position: absolute;
103
- pointer-events: none;
104
- z-index: 2;
105
- }
106
-
107
- .l7-ctrl-top-left {
108
- top: 0;
109
- left: 0;
110
- }
111
-
112
- .l7-ctrl-top-right {
113
- top: 0;
114
- right: 0;
115
- }
116
-
117
- .l7-ctrl-bottom-left {
118
- bottom: 0;
119
- left: 0;
120
- }
121
-
122
- .l7-ctrl-bottom-right {
123
- right: 0;
124
- bottom: 0;
125
- }
126
-
127
- .l7-ctrl {
128
- clear: both;
129
- pointer-events: auto;
130
-
131
- /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */
132
- transform: translate(0, 0);
133
- }
134
-
135
- .l7-ctrl-top-left .l7-ctrl {
136
- margin: 10px 0 0 10px;
137
- float: left;
138
- }
139
-
140
- .l7-ctrl-top-right .l7-ctrl {
141
- margin: 10px 10px 0 0;
142
- float: right;
143
- }
144
-
145
- .l7-ctrl-bottom-left .l7-ctrl {
146
- margin: 0 0 10px 10px;
147
- float: left;
148
- }
149
-
150
- .l7-ctrl-bottom-right .l7-ctrl {
151
- margin: 0 10px 10px 0;
152
- float: right;
153
- }
154
-
155
- .l7-crosshair,
156
- .l7-crosshair .l7-interactive,
157
- .l7-crosshair .l7-interactive:active {
158
- cursor: crosshair;
159
- }
160
-
161
- .l7-boxzoom {
162
- position: absolute;
163
- top: 0;
164
- left: 0;
165
- width: 0;
166
- height: 0;
167
- background: #fff;
168
- border: 2px dotted #202020;
169
- opacity: 0.5;
170
- z-index: 10;
171
- }
@@ -1,384 +0,0 @@
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
- };