@heycar/heycars-map 0.1.8 → 0.2.0
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/README.md +30 -7
- package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +18309 -4
- package/dist/components/AmapLoader/AmapLoader.d.ts +5 -20
- package/dist/components/AmapMarker/AmapMarker.d.ts +3 -2
- package/dist/components/Demo/HeycarDemo.d.ts +3 -3
- package/dist/components/Demo/searchResult.d.ts +1 -1
- package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +3 -2
- package/dist/components/GmapLoader/GmapLoader.d.ts +3 -35
- package/dist/components/GmapMarker/GmapMarker.d.ts +3 -2
- package/dist/components/MapProvider/MapProvider.d.ts +4 -5
- package/dist/hooks/useGeoLocation.d.ts +2 -2
- package/dist/hooks/useMap.d.ts +801 -0
- package/dist/hooks/useMapAutoComplete.d.ts +4 -6
- package/dist/hooks/useMapCityBound.d.ts +5 -6
- package/dist/hooks/useMapEventSource.d.ts +5 -0
- package/dist/hooks/useMapFitView.d.ts +4599 -0
- package/dist/hooks/useMapLoader.d.ts +67 -0
- package/dist/hooks/useMapPlace.d.ts +4 -6
- package/dist/hooks/useMapRecomendPlace.d.ts +5 -797
- package/dist/hooks/useMapSupplier.d.ts +8 -0
- package/dist/hooks/useOverlay.d.ts +12 -0
- package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +5 -6
- package/dist/hooks-business/useBusinessMapRecomendPlace.d.ts +4 -3
- package/dist/index.cjs +52 -52
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1149 -920
- package/dist/types/interface.d.ts +4 -0
- package/package.json +1 -1
- package/src/App.tsx +1 -1
- package/src/api/place.ts +0 -2
- package/src/business-components/AddressBox/AddressBox.tsx +1 -1
- package/src/business-components/AddressLocator/AddressLocator.tsx +1 -1
- package/src/business-components/DrivingLine/DrivingLine.tsx +1 -1
- package/src/business-components/DrivingRoute/DrivingRoute.tsx +2 -3
- package/src/business-components/PassengerCircle/PassengerCircle.tsx +1 -1
- package/src/business-components/PlaceCircle/PlaceCircle.tsx +1 -1
- package/src/business-components/StartEndPoint/StartEndPoint.tsx +23 -7
- package/src/business-components/TaxiCar/TaxiCar.tsx +1 -1
- package/src/business-components/WalkingLine/WalkingLine.tsx +1 -1
- package/src/business-components/WalkingRoute/WalkingRoute.tsx +2 -3
- package/src/business-components/WaveCircle/WaveCircle.tsx +1 -1
- package/src/components/Amap/Amap.ts +1 -1
- package/src/components/AmapInfoWindow/AmapInfoWindow.ts +1 -1
- package/src/components/AmapLoader/AmapLoader.ts +6 -54
- package/src/components/AmapMarker/AmapMarker.ts +5 -2
- package/src/components/AmapPolygon/AmapPolygon.ts +1 -1
- package/src/components/AmapPolyline/AmapPolyline.ts +1 -1
- package/src/components/AmapText/AmapText.ts +1 -1
- package/src/components/Demo/Demo.css.ts +1 -1
- package/src/components/Demo/HeycarDemo.tsx +50 -33
- package/src/components/Demo/SearchDemo.tsx +40 -65
- package/src/components/Demo/searchResult.ts +12888 -1
- package/src/components/Gmap/Gmap.ts +17 -5
- package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +9 -4
- package/src/components/GmapInfoWindow/GmapInfoWindow.ts +1 -1
- package/src/components/GmapLoader/GmapLoader.ts +4 -62
- package/src/components/GmapMarker/GmapMarker.ts +5 -2
- package/src/components/GmapPolygon/GmapPolygon.ts +1 -1
- package/src/components/GmapPolyline/GmapPolyline.ts +1 -1
- package/src/components/MapProvider/MapProvider.tsx +33 -50
- package/src/hooks/useDrivingRoute.ts +1 -1
- package/src/hooks/useGeoLocation.ts +4 -2
- package/src/hooks/useHeycarMap.ts +1 -1
- package/src/hooks/useMap.ts +29 -0
- package/src/hooks/useMapAngle.ts +1 -1
- package/src/hooks/useMapAutoComplete.ts +16 -19
- package/src/hooks/useMapCityBound.ts +36 -24
- package/src/hooks/useMapDrag.ts +1 -1
- package/src/hooks/useMapEventSource.ts +20 -0
- package/src/hooks/useMapFitView.ts +127 -0
- package/src/hooks/useMapLoader.ts +164 -0
- package/src/hooks/useMapPlace.ts +20 -22
- package/src/hooks/useMapRecomendPlace.ts +18 -25
- package/src/{components/MapProvider → hooks}/useMapSupplier.ts +4 -7
- package/src/hooks/useOverlay.ts +22 -0
- package/src/hooks/useWalkingRoute.ts +1 -1
- package/src/hooks-business/useBusinessMapAutoComplete.ts +13 -8
- package/src/hooks-business/useBusinessMapRecomendPlace.ts +10 -10
- package/src/index.ts +3 -1
- package/src/types/interface.ts +5 -0
- package/dist/components/Amap/useAmap.d.ts +0 -399
- package/dist/components/Gmap/useGmap.d.ts +0 -5
- package/dist/components/MapProvider/useMapSupplier.d.ts +0 -11
- package/dist/hooks/useMapReady.d.ts +0 -4
- package/src/components/Amap/useAmap.ts +0 -9
- package/src/components/Gmap/useGmap.ts +0 -7
- package/src/hooks/useMapReady.ts +0 -14
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
import { ShallowRef } from "vue-demi";
|
|
2
|
-
export declare const amapContext: unique symbol;
|
|
3
|
-
export declare const useAmap: () => ShallowRef<{
|
|
4
|
-
_outseaDataType: string;
|
|
5
|
-
setCenter(center: [number, number] | AMap.LngLat, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
6
|
-
getStyleByUserId(id: any, zoom: number): any;
|
|
7
|
-
getCustomTypeByContainerPos(lnglat: any): any;
|
|
8
|
-
getScreenShot(width: number, height: number): string;
|
|
9
|
-
updateView(view: any, render?: boolean | undefined): void;
|
|
10
|
-
destroy(): void;
|
|
11
|
-
setZoomAndCenter(zoom: number, center: [number, number] | AMap.LngLat, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
12
|
-
getBounds(): AMap.Bounds;
|
|
13
|
-
getCenter(): AMap.LngLat;
|
|
14
|
-
getGraphicInfo(): {
|
|
15
|
-
hardwareAccEnabled: any;
|
|
16
|
-
};
|
|
17
|
-
setZoom(zoom: number, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
18
|
-
getZoom(digits?: number | undefined): number;
|
|
19
|
-
zoomIn(): void;
|
|
20
|
-
zoomOut(): void;
|
|
21
|
-
getPitch(): number;
|
|
22
|
-
setPitch(pitch: number, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
23
|
-
getRotation(): number;
|
|
24
|
-
setRotation(rotation?: number | undefined, immediately?: boolean | undefined, duration?: number | undefined): void;
|
|
25
|
-
setBounds(bounds: number[] | AMap.Bounds, immediately?: boolean | undefined, avoid?: number[] | undefined): void;
|
|
26
|
-
panTo(lnglat: [number, number] | AMap.LngLat, duration?: number | undefined): void;
|
|
27
|
-
panBy(x: number, y: number, duration?: number | undefined): void;
|
|
28
|
-
getContainer(): HTMLDivElement;
|
|
29
|
-
add(features: {
|
|
30
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
31
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
32
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
33
|
-
clearEvents(type: AMap.EventType): any;
|
|
34
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
35
|
-
getEvents(): Record<string, any[]>;
|
|
36
|
-
} | {
|
|
37
|
-
CLASS_NAME: string;
|
|
38
|
-
_zIndex: number;
|
|
39
|
-
_opts: any;
|
|
40
|
-
setMap(map: any | null): void;
|
|
41
|
-
setzIndex(z: number): void;
|
|
42
|
-
setOpacity(opacity: number): void;
|
|
43
|
-
getOpacity(): number;
|
|
44
|
-
getzIndex(): number;
|
|
45
|
-
getOptions(): any;
|
|
46
|
-
getZooms(): [number, number];
|
|
47
|
-
setZooms(zooms: [number, number]): void;
|
|
48
|
-
getVisible(): boolean;
|
|
49
|
-
show(): void;
|
|
50
|
-
hide(): void;
|
|
51
|
-
destroy(): void;
|
|
52
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
53
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
54
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
55
|
-
clearEvents(type: AMap.EventType): any;
|
|
56
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
57
|
-
getEvents(): Record<string, any[]>;
|
|
58
|
-
} | ({
|
|
59
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
60
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
61
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
62
|
-
clearEvents(type: AMap.EventType): any;
|
|
63
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
64
|
-
getEvents(): Record<string, any[]>;
|
|
65
|
-
} | {
|
|
66
|
-
CLASS_NAME: string;
|
|
67
|
-
_zIndex: number;
|
|
68
|
-
_opts: any;
|
|
69
|
-
setMap(map: any | null): void;
|
|
70
|
-
setzIndex(z: number): void;
|
|
71
|
-
setOpacity(opacity: number): void;
|
|
72
|
-
getOpacity(): number;
|
|
73
|
-
getzIndex(): number;
|
|
74
|
-
getOptions(): any;
|
|
75
|
-
getZooms(): [number, number];
|
|
76
|
-
setZooms(zooms: [number, number]): void;
|
|
77
|
-
getVisible(): boolean;
|
|
78
|
-
show(): void;
|
|
79
|
-
hide(): void;
|
|
80
|
-
destroy(): void;
|
|
81
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
82
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
83
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
84
|
-
clearEvents(type: AMap.EventType): any;
|
|
85
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
86
|
-
getEvents(): Record<string, any[]>;
|
|
87
|
-
})[]): void;
|
|
88
|
-
remove(features: {
|
|
89
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
90
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
91
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
92
|
-
clearEvents(type: AMap.EventType): any;
|
|
93
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
94
|
-
getEvents(): Record<string, any[]>;
|
|
95
|
-
} | {
|
|
96
|
-
CLASS_NAME: string;
|
|
97
|
-
_zIndex: number;
|
|
98
|
-
_opts: any;
|
|
99
|
-
setMap(map: any | null): void;
|
|
100
|
-
setzIndex(z: number): void;
|
|
101
|
-
setOpacity(opacity: number): void;
|
|
102
|
-
getOpacity(): number;
|
|
103
|
-
getzIndex(): number;
|
|
104
|
-
getOptions(): any;
|
|
105
|
-
getZooms(): [number, number];
|
|
106
|
-
setZooms(zooms: [number, number]): void;
|
|
107
|
-
getVisible(): boolean;
|
|
108
|
-
show(): void;
|
|
109
|
-
hide(): void;
|
|
110
|
-
destroy(): void;
|
|
111
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
112
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
113
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
114
|
-
clearEvents(type: AMap.EventType): any;
|
|
115
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
116
|
-
getEvents(): Record<string, any[]>;
|
|
117
|
-
} | ({
|
|
118
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
119
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
120
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
121
|
-
clearEvents(type: AMap.EventType): any;
|
|
122
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
123
|
-
getEvents(): Record<string, any[]>;
|
|
124
|
-
} | {
|
|
125
|
-
CLASS_NAME: string;
|
|
126
|
-
_zIndex: number;
|
|
127
|
-
_opts: any;
|
|
128
|
-
setMap(map: any | null): void;
|
|
129
|
-
setzIndex(z: number): void;
|
|
130
|
-
setOpacity(opacity: number): void;
|
|
131
|
-
getOpacity(): number;
|
|
132
|
-
getzIndex(): number;
|
|
133
|
-
getOptions(): any;
|
|
134
|
-
getZooms(): [number, number];
|
|
135
|
-
setZooms(zooms: [number, number]): void;
|
|
136
|
-
getVisible(): boolean;
|
|
137
|
-
show(): void;
|
|
138
|
-
hide(): void;
|
|
139
|
-
destroy(): void;
|
|
140
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
141
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
142
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
143
|
-
clearEvents(type: AMap.EventType): any;
|
|
144
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
145
|
-
getEvents(): Record<string, any[]>;
|
|
146
|
-
})[]): void;
|
|
147
|
-
lngLatToCoords(lnglat: [number, number] | AMap.LngLat): [number, number];
|
|
148
|
-
coordsToLngLat(coords: [number, number]): AMap.LngLat;
|
|
149
|
-
lngLatToContainer(lnglat: number[] | AMap.LngLat): AMap.Pixel;
|
|
150
|
-
containerToLngLat(pixel: number[] | AMap.Pixel): AMap.LngLat;
|
|
151
|
-
coordToContainer(coord: [number, number]): [number, number];
|
|
152
|
-
containerToCoord(pixel: number[] | AMap.Pixel): number[];
|
|
153
|
-
pixelToLngLat(pixel: number[] | AMap.Pixel, z?: number | undefined): AMap.LngLat;
|
|
154
|
-
lngLatToPixel(lnglat: number[] | AMap.LngLat, z?: number | undefined): AMap.Pixel;
|
|
155
|
-
getResolution(point?: AMap.LngLat | undefined): number;
|
|
156
|
-
getScale(dpi: number): number;
|
|
157
|
-
getCity(cbk: (result: any) => void, lnglat: number[]): void;
|
|
158
|
-
setCity(cityName: string, cbk: (center: number[] | null, zoom: number | null) => void): void;
|
|
159
|
-
setFitView(overlays?: {
|
|
160
|
-
has(vector: any): boolean;
|
|
161
|
-
clear(): void;
|
|
162
|
-
setOptions(opt: any): void;
|
|
163
|
-
query(lnglat: AMap.LngLatLike): {
|
|
164
|
-
_needUpdate: boolean;
|
|
165
|
-
readonly CLASS_NAME: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
|
166
|
-
className: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
|
167
|
-
_isMoveing: boolean;
|
|
168
|
-
visible: boolean;
|
|
169
|
-
setMap(map: any | null): void;
|
|
170
|
-
getMap(): any | null;
|
|
171
|
-
contains(...args: any[]): boolean;
|
|
172
|
-
remove(): void;
|
|
173
|
-
hide(): void;
|
|
174
|
-
show(): void;
|
|
175
|
-
setDraggable(draggable: boolean): boolean;
|
|
176
|
-
setOptions(args?: any): void;
|
|
177
|
-
getOptions(): any;
|
|
178
|
-
getExtData(): any;
|
|
179
|
-
setExtData(extData: any): void;
|
|
180
|
-
getCursor(): any;
|
|
181
|
-
emit(type: string, events?: any): any;
|
|
182
|
-
getDraggable(): boolean;
|
|
183
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
184
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
185
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
186
|
-
clearEvents(type: AMap.EventType): any;
|
|
187
|
-
getEvents(): Record<string, any[]>;
|
|
188
|
-
} | undefined;
|
|
189
|
-
getBounds(): AMap.Bounds | undefined;
|
|
190
|
-
} | {
|
|
191
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
192
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
193
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
194
|
-
clearEvents(type: AMap.EventType): any;
|
|
195
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
196
|
-
getEvents(): Record<string, any[]>;
|
|
197
|
-
}[] | undefined, immediately?: boolean | undefined, avoid?: number[] | undefined, maxZoom?: number | undefined): AMap.Bounds | undefined;
|
|
198
|
-
getFitZoomAndCenterByOverlays(overlayList: any[], avoid?: number[] | undefined, maxZoom?: number | undefined): any[] | undefined;
|
|
199
|
-
getFitZoomAndCenterByBounds(bounds: number[] | AMap.Bounds, avoid?: number[] | undefined, maxZoom?: number | undefined): any[];
|
|
200
|
-
addControl(control: AMap.Control): void;
|
|
201
|
-
removeControl(control: AMap.Control): void;
|
|
202
|
-
setMapStyle(value: string): void;
|
|
203
|
-
getMapStyle(): string;
|
|
204
|
-
getAllOverlays(type?: string | undefined): any[];
|
|
205
|
-
clearMap(): void;
|
|
206
|
-
clearInfoWindow(): void;
|
|
207
|
-
getFeatures(): string | string[] | undefined;
|
|
208
|
-
setFeatures(features: string[]): void;
|
|
209
|
-
getMapApprovalNumber(): any;
|
|
210
|
-
setMask(maskPath: number[][]): void;
|
|
211
|
-
setLabelRejectMask(reject: boolean): void;
|
|
212
|
-
className: string;
|
|
213
|
-
_resource: Resource<Iterable<{
|
|
214
|
-
destroy?: (() => void) | undefined;
|
|
215
|
-
}> & {
|
|
216
|
-
taskManger: TaskManager;
|
|
217
|
-
SDFCombineTexture: SDFCombineTexture;
|
|
218
|
-
taskThread: RenderThread;
|
|
219
|
-
drawMode: string;
|
|
220
|
-
taskQueue: TaskQueue;
|
|
221
|
-
oversea: Oversea;
|
|
222
|
-
highlight: Highlight;
|
|
223
|
-
}>;
|
|
224
|
-
_loadData?: string | undefined;
|
|
225
|
-
gl?: WebGLRenderingContext | undefined;
|
|
226
|
-
canvas?: HTMLCanvasElement | undefined;
|
|
227
|
-
WebGLParams: any;
|
|
228
|
-
_sourceManager: SourceManager;
|
|
229
|
-
getGL(): WebGLRenderingContext | undefined;
|
|
230
|
-
loadData(): string | undefined;
|
|
231
|
-
getGraphic(): {
|
|
232
|
-
hardwareAccEnabled: any;
|
|
233
|
-
};
|
|
234
|
-
getSize(): AMap.Size;
|
|
235
|
-
addLayer(layer: {
|
|
236
|
-
CLASS_NAME: string;
|
|
237
|
-
_zIndex: number;
|
|
238
|
-
_opts: any;
|
|
239
|
-
setMap(map: any | null): void;
|
|
240
|
-
setzIndex(z: number): void;
|
|
241
|
-
setOpacity(opacity: number): void;
|
|
242
|
-
getOpacity(): number;
|
|
243
|
-
getzIndex(): number;
|
|
244
|
-
getOptions(): any;
|
|
245
|
-
getZooms(): [number, number];
|
|
246
|
-
setZooms(zooms: [number, number]): void;
|
|
247
|
-
getVisible(): boolean;
|
|
248
|
-
show(): void;
|
|
249
|
-
hide(): void;
|
|
250
|
-
destroy(): void;
|
|
251
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
252
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
253
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
254
|
-
clearEvents(type: AMap.EventType): any;
|
|
255
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
256
|
-
getEvents(): Record<string, any[]>;
|
|
257
|
-
}): void;
|
|
258
|
-
removeLayer(layer: {
|
|
259
|
-
CLASS_NAME: string;
|
|
260
|
-
_zIndex: number;
|
|
261
|
-
_opts: any;
|
|
262
|
-
setMap(map: any | null): void;
|
|
263
|
-
setzIndex(z: number): void;
|
|
264
|
-
setOpacity(opacity: number): void;
|
|
265
|
-
getOpacity(): number;
|
|
266
|
-
getzIndex(): number;
|
|
267
|
-
getOptions(): any;
|
|
268
|
-
getZooms(): [number, number];
|
|
269
|
-
setZooms(zooms: [number, number]): void;
|
|
270
|
-
getVisible(): boolean;
|
|
271
|
-
show(): void;
|
|
272
|
-
hide(): void;
|
|
273
|
-
destroy(): void;
|
|
274
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
275
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
276
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
277
|
-
clearEvents(type: AMap.EventType): any;
|
|
278
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
279
|
-
getEvents(): Record<string, any[]>;
|
|
280
|
-
}): void;
|
|
281
|
-
setLayers(layers: {
|
|
282
|
-
CLASS_NAME: string;
|
|
283
|
-
_zIndex: number;
|
|
284
|
-
_opts: any;
|
|
285
|
-
setMap(map: any | null): void;
|
|
286
|
-
setzIndex(z: number): void;
|
|
287
|
-
setOpacity(opacity: number): void;
|
|
288
|
-
getOpacity(): number;
|
|
289
|
-
getzIndex(): number;
|
|
290
|
-
getOptions(): any;
|
|
291
|
-
getZooms(): [number, number];
|
|
292
|
-
setZooms(zooms: [number, number]): void;
|
|
293
|
-
getVisible(): boolean;
|
|
294
|
-
show(): void;
|
|
295
|
-
hide(): void;
|
|
296
|
-
destroy(): void;
|
|
297
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
298
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
299
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
300
|
-
clearEvents(type: AMap.EventType): any;
|
|
301
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
302
|
-
getEvents(): Record<string, any[]>;
|
|
303
|
-
}[]): void;
|
|
304
|
-
getLayers(): {
|
|
305
|
-
CLASS_NAME: string;
|
|
306
|
-
_zIndex: number;
|
|
307
|
-
_opts: any;
|
|
308
|
-
setMap(map: any | null): void;
|
|
309
|
-
setzIndex(z: number): void;
|
|
310
|
-
setOpacity(opacity: number): void;
|
|
311
|
-
getOpacity(): number;
|
|
312
|
-
getzIndex(): number;
|
|
313
|
-
getOptions(): any;
|
|
314
|
-
getZooms(): [number, number];
|
|
315
|
-
setZooms(zooms: [number, number]): void;
|
|
316
|
-
getVisible(): boolean;
|
|
317
|
-
show(): void;
|
|
318
|
-
hide(): void;
|
|
319
|
-
destroy(): void;
|
|
320
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
321
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
322
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
323
|
-
clearEvents(type: AMap.EventType): any;
|
|
324
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
325
|
-
getEvents(): Record<string, any[]>;
|
|
326
|
-
}[];
|
|
327
|
-
getLayersDangerous(): {
|
|
328
|
-
CLASS_NAME: string;
|
|
329
|
-
_zIndex: number;
|
|
330
|
-
_opts: any;
|
|
331
|
-
setMap(map: any | null): void;
|
|
332
|
-
setzIndex(z: number): void;
|
|
333
|
-
setOpacity(opacity: number): void;
|
|
334
|
-
getOpacity(): number;
|
|
335
|
-
getzIndex(): number;
|
|
336
|
-
getOptions(): any;
|
|
337
|
-
getZooms(): [number, number];
|
|
338
|
-
setZooms(zooms: [number, number]): void;
|
|
339
|
-
getVisible(): boolean;
|
|
340
|
-
show(): void;
|
|
341
|
-
hide(): void;
|
|
342
|
-
destroy(): void;
|
|
343
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
344
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
345
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
346
|
-
clearEvents(type: AMap.EventType): any;
|
|
347
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
348
|
-
getEvents(): Record<string, any[]>;
|
|
349
|
-
}[];
|
|
350
|
-
getStatus(): {
|
|
351
|
-
dragEnable: boolean;
|
|
352
|
-
zoomEnable: boolean;
|
|
353
|
-
doubleClickZoom: boolean;
|
|
354
|
-
keyboardEnable: boolean;
|
|
355
|
-
jogEnable: boolean;
|
|
356
|
-
scrollWheel: boolean;
|
|
357
|
-
zoomSpeed: number;
|
|
358
|
-
animateEnable: boolean;
|
|
359
|
-
touchZoomCenter: number;
|
|
360
|
-
touchZoom: boolean;
|
|
361
|
-
pitchEnable: boolean;
|
|
362
|
-
rotateEnable: boolean;
|
|
363
|
-
showBuildingBlock: boolean | undefined;
|
|
364
|
-
isHotspot: boolean;
|
|
365
|
-
mapstyleUrl: string;
|
|
366
|
-
features: string | string[] | undefined;
|
|
367
|
-
allBubble: boolean;
|
|
368
|
-
pickWhenMoving: boolean;
|
|
369
|
-
};
|
|
370
|
-
setStatus(status: any): void;
|
|
371
|
-
getOutseaState(): boolean;
|
|
372
|
-
getOutseaDataType(): string;
|
|
373
|
-
getMapboxStyle(): any;
|
|
374
|
-
_setStyleByPlat(style: any): void;
|
|
375
|
-
getDefaultCursor(): string;
|
|
376
|
-
setDefaultCursor(cursor: string): void;
|
|
377
|
-
getLimitBounds(): AMap.Bounds | undefined;
|
|
378
|
-
setLimitBounds(bounds: number[] | AMap.Bounds): void;
|
|
379
|
-
clearLimitBounds(): void;
|
|
380
|
-
getZooms(): [number, number];
|
|
381
|
-
setZooms(zooms: [number, number]): void;
|
|
382
|
-
getSkyColor(optimalZoom: number): number[];
|
|
383
|
-
getatmosColor(optimalZoom: number): number[];
|
|
384
|
-
getStamp(): number;
|
|
385
|
-
getStyleByIdForUser(id: any, zoom: number): any;
|
|
386
|
-
getTileZoom(z: number): any;
|
|
387
|
-
getCustomTypeByPos(pos: any): any;
|
|
388
|
-
getLabelRejectMask(): boolean;
|
|
389
|
-
setHighlight(mainKey: number, subKey: number[]): void;
|
|
390
|
-
start(): void;
|
|
391
|
-
stop(): void;
|
|
392
|
-
on(type: AMap.EventType | AMap.EventType[], fn: (e: any) => void, context?: any, once?: boolean | undefined): any;
|
|
393
|
-
off(type: AMap.EventType, fn: (e: any) => void, context?: any): any;
|
|
394
|
-
hasEvents(type: AMap.EventType, fn: (e: any) => void, context?: any): boolean;
|
|
395
|
-
clearEvents(type: AMap.EventType): any;
|
|
396
|
-
emit(type: AMap.EventType, data?: any): any;
|
|
397
|
-
getEvents(): Record<string, any[]>;
|
|
398
|
-
} | undefined> | undefined;
|
|
399
|
-
export declare const provideAmap: (mapRef: ShallowRef<AMap.Map | undefined>) => void;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="google.maps" />
|
|
2
|
-
import { ShallowRef } from "vue-demi";
|
|
3
|
-
export declare const gmapContext: unique symbol;
|
|
4
|
-
export declare const useGmap: () => ShallowRef<google.maps.Map | undefined> | undefined;
|
|
5
|
-
export declare const provideGmap: (mapRef: ShallowRef<google.maps.Map | undefined>) => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type MapSupplier = "gmap" | "amap";
|
|
2
|
-
export interface MapSupplierPayolad {
|
|
3
|
-
gmapKey: string;
|
|
4
|
-
gmapId: string;
|
|
5
|
-
amapKey: string;
|
|
6
|
-
amapSecret?: string;
|
|
7
|
-
amapServiceHost?: string;
|
|
8
|
-
supplier: MapSupplier;
|
|
9
|
-
}
|
|
10
|
-
export declare const useMapSupplier: () => MapSupplierPayolad;
|
|
11
|
-
export declare const provideMapSupplier: (payload: MapSupplierPayolad) => void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { inject, provide, ShallowRef } from "vue-demi";
|
|
2
|
-
|
|
3
|
-
export const amapContext = Symbol();
|
|
4
|
-
|
|
5
|
-
export const useAmap = () => {
|
|
6
|
-
return inject<ShallowRef<AMap.Map | undefined>>(amapContext);
|
|
7
|
-
};
|
|
8
|
-
export const provideAmap = (mapRef: ShallowRef<AMap.Map | undefined>) =>
|
|
9
|
-
provide(amapContext, mapRef);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { inject, provide, ShallowRef } from "vue-demi";
|
|
2
|
-
|
|
3
|
-
export const gmapContext = Symbol();
|
|
4
|
-
|
|
5
|
-
export const useGmap = () => inject<ShallowRef<google.maps.Map | undefined>>(gmapContext);
|
|
6
|
-
export const provideGmap = (mapRef: ShallowRef<google.maps.Map | undefined>) =>
|
|
7
|
-
provide(gmapContext, mapRef);
|
package/src/hooks/useMapReady.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ref, watch } from "vue-demi";
|
|
2
|
-
import type { MapShallowRef } from "../types/interface";
|
|
3
|
-
|
|
4
|
-
export const useMapReady = (mapRef: MapShallowRef) => {
|
|
5
|
-
const readyRef = ref(!!mapRef.value);
|
|
6
|
-
watch(
|
|
7
|
-
() => mapRef.value,
|
|
8
|
-
(map) => {
|
|
9
|
-
if (!map) return;
|
|
10
|
-
readyRef.value = true;
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
return { readyRef };
|
|
14
|
-
};
|