@antv/l7-map 2.18.2 → 2.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/camera.d.ts +85 -0
- package/es/camera.js +718 -0
- package/es/css/l7.css +98 -0
- package/es/earthmap.d.ts +66 -0
- package/es/earthmap.js +369 -0
- package/es/geo/edge_insets.d.ts +54 -0
- package/es/geo/edge_insets.js +108 -0
- package/es/geo/lng_lat.d.ts +18 -0
- package/es/geo/lng_lat.js +73 -0
- package/es/geo/lng_lat_bounds.d.ts +24 -0
- package/es/geo/lng_lat_bounds.js +154 -0
- package/es/geo/mercator.d.ts +29 -0
- package/es/geo/mercator.js +84 -0
- package/es/geo/point.d.ts +40 -0
- package/es/geo/point.js +224 -0
- package/es/geo/simple.d.ts +29 -0
- package/es/geo/simple.js +87 -0
- package/es/geo/transform.d.ts +198 -0
- package/es/geo/transform.js +961 -0
- package/es/handler/IHandler.d.ts +34 -0
- package/es/handler/IHandler.js +1 -0
- package/es/handler/blockable_map_event.d.ts +17 -0
- package/es/handler/blockable_map_event.js +78 -0
- package/es/handler/box_zoom.d.ts +59 -0
- package/es/handler/box_zoom.js +180 -0
- package/es/handler/click_zoom.d.ts +16 -0
- package/es/handler/click_zoom.js +54 -0
- package/es/handler/events/event.d.ts +4 -0
- package/es/handler/events/event.js +11 -0
- package/es/handler/events/index.d.ts +4 -0
- package/es/handler/events/index.js +4 -0
- package/es/handler/events/map_mouse_event.d.ts +34 -0
- package/es/handler/events/map_mouse_event.js +64 -0
- package/es/handler/events/map_touch_event.d.ts +57 -0
- package/es/handler/events/map_touch_event.js +95 -0
- package/es/handler/events/map_wheel_event.d.ts +33 -0
- package/es/handler/events/map_wheel_event.js +50 -0
- package/es/handler/events/render_event.d.ts +5 -0
- package/es/handler/events/render_event.js +26 -0
- package/es/handler/handler_inertia.d.ts +23 -0
- package/es/handler/handler_inertia.js +157 -0
- package/es/handler/handler_manager.d.ts +61 -0
- package/es/handler/handler_manager.js +577 -0
- package/es/handler/handler_util.d.ts +4 -0
- package/es/handler/handler_util.js +9 -0
- package/es/handler/keyboard.d.ts +36 -0
- package/es/handler/keyboard.js +143 -0
- package/es/handler/map_event.d.ts +29 -0
- package/es/handler/map_event.js +125 -0
- package/es/handler/mouse/index.d.ts +4 -0
- package/es/handler/mouse/index.js +4 -0
- package/es/handler/mouse/mouse_handler.d.ts +22 -0
- package/es/handler/mouse/mouse_handler.js +118 -0
- package/es/handler/mouse/mousepan_handler.d.ts +10 -0
- package/es/handler/mouse/mousepan_handler.js +44 -0
- package/es/handler/mouse/mousepitch_hander.d.ts +9 -0
- package/es/handler/mouse/mousepitch_hander.js +46 -0
- package/es/handler/mouse/mouserotate_hander.d.ts +9 -0
- package/es/handler/mouse/mouserotate_hander.js +46 -0
- package/es/handler/mouse/util.d.ts +6 -0
- package/es/handler/mouse/util.js +11 -0
- package/es/handler/scroll_zoom.d.ts +93 -0
- package/es/handler/scroll_zoom.js +325 -0
- package/es/handler/shim/dblclick_zoom.d.ts +40 -0
- package/es/handler/shim/dblclick_zoom.js +67 -0
- package/es/handler/shim/drag_pan.d.ts +61 -0
- package/es/handler/shim/drag_pan.js +84 -0
- package/es/handler/shim/drag_rotate.d.ts +46 -0
- package/es/handler/shim/drag_rotate.js +74 -0
- package/es/handler/shim/touch_zoom_rotate.d.ts +70 -0
- package/es/handler/shim/touch_zoom_rotate.js +115 -0
- package/es/handler/tap/single_tap_recognizer.d.ts +20 -0
- package/es/handler/tap/single_tap_recognizer.js +97 -0
- package/es/handler/tap/tap_drag_zoom.d.ts +22 -0
- package/es/handler/tap/tap_drag_zoom.js +106 -0
- package/es/handler/tap/tap_recognizer.d.ts +17 -0
- package/es/handler/tap/tap_recognizer.js +54 -0
- package/es/handler/tap/tap_zoom.d.ts +22 -0
- package/es/handler/tap/tap_zoom.js +109 -0
- package/es/handler/touch/index.d.ts +5 -0
- package/es/handler/touch/index.js +5 -0
- package/es/handler/touch/touch_pan.d.ts +30 -0
- package/es/handler/touch/touch_pan.js +110 -0
- package/es/handler/touch/touch_pitch.d.ts +13 -0
- package/es/handler/touch/touch_pitch.js +93 -0
- package/es/handler/touch/touch_rotate.d.ts +12 -0
- package/es/handler/touch/touch_rotate.js +77 -0
- package/es/handler/touch/touch_zoom.d.ts +12 -0
- package/es/handler/touch/touch_zoom.js +54 -0
- package/es/handler/touch/two_touch.d.ts +23 -0
- package/es/handler/touch/two_touch.js +125 -0
- package/es/hash.d.ts +14 -0
- package/es/hash.js +134 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/es/interface.d.ts +34 -0
- package/es/interface.js +1 -0
- package/es/map.d.ts +70 -0
- package/es/map.js +387 -0
- package/es/util.d.ts +25 -0
- package/es/util.js +88 -0
- package/es/utils/Aabb.d.ts +12 -0
- package/es/utils/Aabb.js +112 -0
- package/es/utils/dom.d.ts +4 -0
- package/es/utils/dom.js +140 -0
- package/es/utils/performance.d.ts +17 -0
- package/es/utils/performance.js +62 -0
- package/es/utils/primitives.d.ts +6 -0
- package/es/utils/primitives.js +47 -0
- package/es/utils/task_queue.d.ts +13 -0
- package/es/utils/task_queue.js +89 -0
- package/lib/camera.js +724 -0
- package/lib/css/l7.css +98 -0
- package/lib/earthmap.js +376 -0
- package/lib/geo/edge_insets.js +114 -0
- package/lib/geo/lng_lat.js +81 -0
- package/lib/geo/lng_lat_bounds.js +161 -0
- package/lib/geo/mercator.js +100 -0
- package/lib/geo/point.js +231 -0
- package/lib/geo/simple.js +104 -0
- package/lib/geo/transform.js +971 -0
- package/lib/handler/IHandler.js +5 -0
- package/lib/handler/blockable_map_event.js +84 -0
- package/lib/handler/box_zoom.js +186 -0
- package/lib/handler/click_zoom.js +61 -0
- package/lib/handler/events/event.js +20 -0
- package/lib/handler/events/index.js +27 -0
- package/lib/handler/events/map_mouse_event.js +70 -0
- package/lib/handler/events/map_touch_event.js +100 -0
- package/lib/handler/events/map_wheel_event.js +57 -0
- package/lib/handler/events/render_event.js +33 -0
- package/lib/handler/handler_inertia.js +162 -0
- package/lib/handler/handler_manager.js +584 -0
- package/lib/handler/handler_util.js +15 -0
- package/lib/handler/keyboard.js +151 -0
- package/lib/handler/map_event.js +131 -0
- package/lib/handler/mouse/index.js +27 -0
- package/lib/handler/mouse/mouse_handler.js +124 -0
- package/lib/handler/mouse/mousepan_handler.js +49 -0
- package/lib/handler/mouse/mousepitch_hander.js +51 -0
- package/lib/handler/mouse/mouserotate_hander.js +51 -0
- package/lib/handler/mouse/util.js +22 -0
- package/lib/handler/scroll_zoom.js +333 -0
- package/lib/handler/shim/dblclick_zoom.js +74 -0
- package/lib/handler/shim/drag_pan.js +91 -0
- package/lib/handler/shim/drag_rotate.js +81 -0
- package/lib/handler/shim/touch_zoom_rotate.js +122 -0
- package/lib/handler/tap/single_tap_recognizer.js +106 -0
- package/lib/handler/tap/tap_drag_zoom.js +112 -0
- package/lib/handler/tap/tap_recognizer.js +63 -0
- package/lib/handler/tap/tap_zoom.js +115 -0
- package/lib/handler/touch/index.js +34 -0
- package/lib/handler/touch/touch_pan.js +117 -0
- package/lib/handler/touch/touch_pitch.js +98 -0
- package/lib/handler/touch/touch_rotate.js +82 -0
- package/lib/handler/touch/touch_zoom.js +59 -0
- package/lib/handler/touch/two_touch.js +131 -0
- package/lib/hash.js +143 -0
- package/lib/index.js +49 -0
- package/lib/interface.js +5 -0
- package/lib/map.js +394 -0
- package/lib/util.js +108 -0
- package/lib/utils/Aabb.js +119 -0
- package/lib/utils/dom.js +147 -0
- package/lib/utils/performance.js +70 -0
- package/lib/utils/primitives.js +54 -0
- package/lib/utils/task_queue.js +97 -0
- package/package.json +3 -3
package/es/camera.d.ts
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { EventEmitter } from 'eventemitter3';
|
|
2
|
+
import { IPaddingOptions } from './geo/edge_insets';
|
|
3
|
+
import LngLat, { LngLatLike } from './geo/lng_lat';
|
|
4
|
+
import { LngLatBoundsLike } from './geo/lng_lat_bounds';
|
|
5
|
+
import { PointLike } from './geo/point';
|
|
6
|
+
import Transform from './geo/transform';
|
|
7
|
+
import { IMapOptions } from './interface';
|
|
8
|
+
type CallBack = (_: number) => void;
|
|
9
|
+
export interface ICameraOptions {
|
|
10
|
+
center?: LngLatLike;
|
|
11
|
+
zoom?: number;
|
|
12
|
+
bearing?: number;
|
|
13
|
+
pitch?: number;
|
|
14
|
+
around?: LngLatLike;
|
|
15
|
+
padding?: IPaddingOptions;
|
|
16
|
+
}
|
|
17
|
+
export interface IAnimationOptions {
|
|
18
|
+
duration?: number;
|
|
19
|
+
easing?: (_: number) => number;
|
|
20
|
+
offset?: PointLike;
|
|
21
|
+
animate?: boolean;
|
|
22
|
+
essential?: boolean;
|
|
23
|
+
linear?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export default class Camera extends EventEmitter {
|
|
26
|
+
transform: Transform;
|
|
27
|
+
protected options: IMapOptions;
|
|
28
|
+
protected moving: boolean;
|
|
29
|
+
protected zooming: boolean;
|
|
30
|
+
protected rotating: boolean;
|
|
31
|
+
protected pitching: boolean;
|
|
32
|
+
protected padding: boolean;
|
|
33
|
+
private bearingSnap;
|
|
34
|
+
private easeEndTimeoutID;
|
|
35
|
+
private easeStart;
|
|
36
|
+
private easeOptions;
|
|
37
|
+
private easeId;
|
|
38
|
+
private onEaseFrame;
|
|
39
|
+
private onEaseEnd;
|
|
40
|
+
private easeFrameId;
|
|
41
|
+
private pitchEnabled;
|
|
42
|
+
private rotateEnabled;
|
|
43
|
+
constructor(options: IMapOptions);
|
|
44
|
+
requestRenderFrame(cb: CallBack): number;
|
|
45
|
+
cancelRenderFrame(_: number): void;
|
|
46
|
+
getCenter(): LngLat;
|
|
47
|
+
getZoom(): number;
|
|
48
|
+
getPitch(): number;
|
|
49
|
+
setCenter(center: LngLatLike, eventData?: any): boolean;
|
|
50
|
+
setPitch(pitch: number, eventData?: any): this;
|
|
51
|
+
getBearing(): number;
|
|
52
|
+
panTo(lnglat: LngLatLike, options?: IAnimationOptions, eventData?: any): this;
|
|
53
|
+
panBy(offset: PointLike, options?: IAnimationOptions, eventData?: any): this;
|
|
54
|
+
zoomOut(options?: IAnimationOptions, eventData?: any): this;
|
|
55
|
+
setBearing(bearing: number, eventData?: any): this;
|
|
56
|
+
setZoom(zoom: number, eventData?: any): this;
|
|
57
|
+
zoomIn(options?: IAnimationOptions, eventData?: any): this;
|
|
58
|
+
zoomTo(zoom: number, options?: IAnimationOptions, eventData?: any): this;
|
|
59
|
+
getPadding(): IPaddingOptions;
|
|
60
|
+
setPadding(padding: IPaddingOptions, eventData?: any): this;
|
|
61
|
+
rotateTo(bearing: number, options?: IAnimationOptions, eventData?: any): this;
|
|
62
|
+
resetNorth(options?: IAnimationOptions, eventData?: any): this;
|
|
63
|
+
resetNorthPitch(options?: IAnimationOptions, eventData?: any): this;
|
|
64
|
+
fitBounds(bounds: LngLatBoundsLike, options?: IAnimationOptions & ICameraOptions, eventData?: any): boolean | this;
|
|
65
|
+
cameraForBounds(bounds: LngLatBoundsLike, options?: ICameraOptions): void | (ICameraOptions & IAnimationOptions);
|
|
66
|
+
snapToNorth(options?: IAnimationOptions, eventData?: any): this;
|
|
67
|
+
jumpTo(options?: ICameraOptions, eventData?: any): boolean;
|
|
68
|
+
easeTo(options?: ICameraOptions & IAnimationOptions & {
|
|
69
|
+
easeId?: string;
|
|
70
|
+
noMoveStart?: boolean;
|
|
71
|
+
}, eventData?: any): this;
|
|
72
|
+
flyTo(options?: any, eventData?: any): boolean | this;
|
|
73
|
+
fitScreenCoordinates(p0: PointLike, p1: PointLike, bearing: number, options?: IAnimationOptions & ICameraOptions, eventData?: any): boolean | this;
|
|
74
|
+
stop(allowGestures?: boolean, easeId?: string): this;
|
|
75
|
+
renderFrameCallback: () => void;
|
|
76
|
+
private normalizeBearing;
|
|
77
|
+
private normalizeCenter;
|
|
78
|
+
private fireMoveEvents;
|
|
79
|
+
private prepareEase;
|
|
80
|
+
private afterEase;
|
|
81
|
+
private ease;
|
|
82
|
+
private cameraForBoxAndBearing;
|
|
83
|
+
private fitInternal;
|
|
84
|
+
}
|
|
85
|
+
export {};
|