@antv/l7-component 2.21.0 → 2.21.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.
- package/es/assets/iconfont/iconfont.js +6 -6
- package/es/constants/index.js +2 -2
- package/es/control/baseControl/buttonControl.js +109 -144
- package/es/control/baseControl/control.js +212 -258
- package/es/control/baseControl/popperControl.js +67 -95
- package/es/control/baseControl/selectControl.js +132 -178
- package/es/control/exportImage.js +59 -142
- package/es/control/fullscreen.js +69 -100
- package/es/control/geoLocate.js +37 -84
- package/es/control/layerSwitch.js +111 -154
- package/es/control/logo.js +43 -69
- package/es/control/mapTheme.js +57 -98
- package/es/control/mouseLocation.js +37 -69
- package/es/control/scale.js +107 -135
- package/es/control/swipe.js +297 -393
- package/es/control/zoom.js +80 -112
- package/es/css/index.css +10 -7
- package/es/index.js +667 -1
- package/es/marker-layer.js +274 -326
- package/es/marker.d.ts +0 -2
- package/es/marker.js +394 -453
- package/es/popup/layerPopup.js +277 -321
- package/es/popup/popup.js +422 -482
- package/es/utils/anchor.js +6 -6
- package/es/utils/icon.js +4 -4
- package/es/utils/popper.js +180 -196
- package/es/utils/screenfull.js +29 -51
- package/lib/assets/iconfont/iconfont.js +6 -6
- package/lib/constants/index.d.ts +60 -0
- package/lib/constants/index.js +2 -2
- package/lib/control/baseControl/buttonControl.d.ts +60 -0
- package/lib/control/baseControl/buttonControl.js +110 -143
- package/lib/control/baseControl/control.d.ts +112 -0
- package/lib/control/baseControl/control.js +213 -257
- package/lib/control/baseControl/index.d.ts +4 -0
- package/lib/control/baseControl/index.js +5 -5
- package/lib/control/baseControl/popperControl.d.ts +28 -0
- package/lib/control/baseControl/popperControl.js +68 -94
- package/lib/control/baseControl/selectControl.d.ts +53 -0
- package/lib/control/baseControl/selectControl.js +133 -177
- package/lib/control/exportImage.d.ts +19 -0
- package/lib/control/exportImage.js +60 -141
- package/lib/control/fullscreen.d.ts +20 -0
- package/lib/control/fullscreen.js +70 -99
- package/lib/control/geoLocate.d.ts +17 -0
- package/lib/control/geoLocate.js +38 -83
- package/lib/control/layerSwitch.d.ts +27 -0
- package/lib/control/layerSwitch.js +112 -153
- package/lib/control/logo.d.ts +14 -0
- package/lib/control/logo.js +44 -69
- package/lib/control/mapTheme.d.ts +11 -0
- package/lib/control/mapTheme.js +58 -97
- package/lib/control/mouseLocation.d.ts +16 -0
- package/lib/control/mouseLocation.js +38 -68
- package/lib/control/scale.d.ts +35 -0
- package/lib/control/scale.js +108 -134
- package/lib/control/swipe.d.ts +66 -0
- package/lib/control/swipe.js +298 -392
- package/lib/control/zoom.d.ts +39 -0
- package/lib/control/zoom.js +81 -111
- package/lib/css/index.css +10 -7
- package/lib/index.d.ts +19 -0
- package/lib/index.js +683 -17
- package/lib/interface.d.ts +18 -0
- package/lib/marker-layer.d.ts +55 -0
- package/lib/marker-layer.js +276 -324
- package/lib/marker.d.ts +58 -0
- package/lib/marker.js +395 -452
- package/lib/popup/layerPopup.d.ts +99 -0
- package/lib/popup/layerPopup.js +278 -320
- package/lib/popup/popup.d.ts +142 -0
- package/lib/popup/popup.js +423 -481
- package/lib/utils/anchor.d.ts +22 -0
- package/lib/utils/anchor.js +6 -6
- package/lib/utils/icon.d.ts +1 -0
- package/lib/utils/icon.js +6 -5
- package/lib/utils/popper.d.ts +76 -0
- package/lib/utils/popper.js +184 -196
- package/lib/utils/screenfull.d.ts +2 -0
- package/lib/utils/screenfull.js +29 -52
- package/package.json +16 -20
- package/CHANGELOG.md +0 -325
- package/LICENSE.md +0 -21
package/lib/marker.d.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ILngLat, IMarkerContainerAndBounds, IMarkerOption, IPoint, IPopup, L7Container } from '@antv/l7-core';
|
|
2
|
+
import { anchorType } from '@antv/l7-utils';
|
|
3
|
+
import { EventEmitter } from 'eventemitter3';
|
|
4
|
+
export default class Marker extends EventEmitter {
|
|
5
|
+
private markerOption;
|
|
6
|
+
private popup;
|
|
7
|
+
private mapsService;
|
|
8
|
+
private lngLat;
|
|
9
|
+
private scene;
|
|
10
|
+
private added;
|
|
11
|
+
private preLngLat;
|
|
12
|
+
getMarkerLayerContainerSize(): IMarkerContainerAndBounds | void;
|
|
13
|
+
constructor(option?: Partial<IMarkerOption>);
|
|
14
|
+
getDefault(): {
|
|
15
|
+
element: undefined;
|
|
16
|
+
anchor: anchorType;
|
|
17
|
+
offsets: number[];
|
|
18
|
+
color: string;
|
|
19
|
+
draggable: boolean;
|
|
20
|
+
};
|
|
21
|
+
addTo(scene: L7Container): this;
|
|
22
|
+
remove(): this;
|
|
23
|
+
setLnglat(lngLat: ILngLat | IPoint): this;
|
|
24
|
+
getLnglat(): ILngLat;
|
|
25
|
+
getElement(): HTMLElement;
|
|
26
|
+
setElement(el: HTMLElement): this;
|
|
27
|
+
openPopup(): this;
|
|
28
|
+
closePopup(): this;
|
|
29
|
+
setPopup(popup: IPopup): this;
|
|
30
|
+
togglePopup(): this;
|
|
31
|
+
getPopup(): IPopup;
|
|
32
|
+
getOffset(): number[];
|
|
33
|
+
setDraggable(draggable: boolean): void;
|
|
34
|
+
getDraggable(): boolean;
|
|
35
|
+
getExtData(): any;
|
|
36
|
+
setExtData(data: any): void;
|
|
37
|
+
private update;
|
|
38
|
+
private updatePositionWhenZoom;
|
|
39
|
+
private onMapClick;
|
|
40
|
+
private getCurrentContainerSize;
|
|
41
|
+
private updateDraggable;
|
|
42
|
+
private onMarkerDragStart;
|
|
43
|
+
private onMarkerDragMove;
|
|
44
|
+
private onMarkerDragEnd;
|
|
45
|
+
private updatePosition;
|
|
46
|
+
private init;
|
|
47
|
+
private registerMarkerEvent;
|
|
48
|
+
private unRegisterMarkerEvent;
|
|
49
|
+
private eventHandle;
|
|
50
|
+
/**
|
|
51
|
+
* 高德 2.x 使用了 fastClick.js 避免延迟,导致 IOS 移动端的 click 事件不会正常触发,需要手动触发
|
|
52
|
+
* @param e
|
|
53
|
+
*/
|
|
54
|
+
private touchStartTime;
|
|
55
|
+
private polyfillEvent;
|
|
56
|
+
private addDragHandler;
|
|
57
|
+
private onUp;
|
|
58
|
+
}
|