1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
import { Component } from 'react';
import { Bounds, MapProps, MapReactState, MinMaxBounds, MoveEvent, Point, TileComponent, TileValues, WAdd, WarningType, WRem } from '../types';
export declare class Map extends Component<MapProps, MapReactState> {
static defaultProps: {
animate: boolean;
metaWheelZoom: boolean;
metaWheelZoomWarning: string;
twoFingerDrag: boolean;
twoFingerDragWarning: string;
zoomSnap: boolean;
mouseEvents: boolean;
touchEvents: boolean;
warningZIndex: number;
animateMaxScreens: number;
minZoom: number;
maxZoom: number;
limitBounds: string;
dprs: any[];
tileComponent: TileComponent;
};
_containerRef?: HTMLDivElement;
_mousePosition?: Point;
_loadTracker?: {
[key: string]: boolean;
};
_dragStart: Point | null;
_mouseDown: boolean;
_moveEvents: MoveEvent[];
_lastClick: number | null;
_lastTap: number | null;
_lastWheel: number | null;
_touchStartPixel: Point[] | null;
_touchStartMidPoint: Point | null;
_touchStartDistance: number | null;
_secondTouchEnd: number | null;
_warningClearTimeout: number | null;
_isAnimating: boolean;
_animationStart: number | null;
_animationEnd: number | null;
_zoomStart: number | null;
_centerTarget: Point | null;
_zoomTarget: number | null;
_zoomAround: Point | null;
_animFrame: number | null;
_boundsSynced: boolean;
_minMaxCache: [number, number, number, MinMaxBounds] | null;
_lastZoom: number;
_lastCenter: Point;
_centerStart?: Point;
_resizeObserver: any;
constructor(props: MapProps);
componentDidMount(): void;
componentWillUnmount(): void;
updateWidthHeight: () => boolean;
wa: WAdd;
wr: WRem;
bindMouseEvents: () => void;
bindTouchEvents: () => void;
unbindMouseEvents: () => void;
unbindTouchEvents: () => void;
bindResizeEvent: () => void;
unbindResizeEvent: () => void;
bindWheelEvent: () => void;
unbindWheelEvent: () => void;
componentDidUpdate(prevProps: MapProps): void;
setCenterZoomTarget: (center: Point | null, zoom: number, fromProps?: boolean, zoomAround?: Point | null, animationDuration?: number) => void;
setCenterZoomForChildren: (center: Point | null, zoom: number) => void;
distanceInScreens: (centerTarget: Point, zoomTarget: number, center: Point, zoom: number) => number;
animationStep: (timestamp: number) => {
centerStep: Point;
zoomStep: number;
};
animate: (timestamp: number) => void;
stopAnimating: () => void;
limitCenterAtZoom: (center?: Point | null, zoom?: number | null) => Point;
onAnimationStart: () => void;
onAnimationStop: () => void;
setCenterZoom: (center?: Point | null, zoom?: number | null, animationEnded?: boolean) => void;
getBoundsMinMax: (zoom: number) => MinMaxBounds;
tileLoaded: (key: string) => void;
coordsInside(pixel: Point): boolean;
handleTouchStart: (event: TouchEvent) => void;
handleTouchMove: (event: TouchEvent) => void;
handleTouchEnd: (event: TouchEvent) => void;
handleMouseDown: (event: MouseEvent) => void;
handleMouseMove: (event: MouseEvent) => void;
handleMouseUp: (event: MouseEvent) => void;
stopTrackingMoveEvents: () => void;
trackMoveEvents: (coords: Point) => void;
throwAfterMoving: (coords: Point, center: Point, zoom: number) => void;
sendDeltaChange: () => {
center: Point;
zoom: number;
};
getBounds: (center?: Point, zoom?: number) => Bounds;
syncToProps: (center?: Point, zoom?: number) => void;
handleWheel: (event: WheelEvent) => void;
showWarning: (warningType: WarningType) => void;
clearWarning: () => void;
zoomAroundMouse: (zoomDiff: number, event: MouseEvent) => void;
zoomPlusDelta: () => number;
pixelToLatLng: (pixel: Point, center?: Point, zoom?: number) => Point;
latLngToPixel: (latLng: Point, center?: Point, zoom?: number) => Point;
calculateZoomCenter: (center: Point, coords: Point, oldZoom: number, newZoom: number) => Point;
setRef: (dom: HTMLDivElement) => void;
tileValues({ center, zoom, pixelDelta, zoomDelta, width, height, }: {
center: Point;
zoom: number;
pixelDelta?: Point;
zoomDelta?: number;
width: number;
height: number;
}): TileValues;
renderTiles(): JSX.Element;
renderOverlays(): JSX.Element;
renderAttribution(): JSX.Element | null;
renderWarning(): JSX.Element | null;
render(): JSX.Element;
}
|