@heycar/heycars-map 2.5.3 → 2.6.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 +4 -0
- package/dist/v2/Demo/DemoBusinessRecomendPlace.js +1 -1
- package/dist/v2/api/contants.d.ts +3 -3
- package/dist/v2/api/contants.js +3 -3
- package/dist/v2/api/googleDirections.d.ts +26 -0
- package/dist/v2/api/googleDirections.js +139 -0
- package/dist/v2/api/googleSnapRoad.d.ts +0 -1
- package/dist/v2/api/googleSnapRoad.js +6 -14
- package/dist/v2/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
- package/dist/v2/business-components/BusinessRecomendPlaceMap/index.js +1 -1
- package/dist/v2/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +4 -3
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +0 -1
- package/dist/v2/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +1 -3
- package/dist/v2/chunks/{BusinessRecomendPlaceMap.824002ef.js → BusinessRecomendPlaceMap.7b67c30c.js} +3 -2
- package/dist/v2/components/Gmap/Gmap.js +8 -2
- package/dist/v2/components/MapProvider/MapProvider.d.ts +1 -1
- package/dist/v2/components/MapProvider/MapProvider.js +6 -2
- package/dist/v2/hooks/useDrivingRoute.js +5 -82
- package/dist/v2/hooks/useMapAngle.d.ts +4 -3
- package/dist/v2/hooks/useMapCoordinatify.js +1 -1
- package/dist/v2/hooks/useMapFitView.js +4 -2
- package/dist/v2/hooks/useMapGraspRoad.d.ts +5 -8
- package/dist/v2/hooks/useMapGraspRoad.js +9 -60
- package/dist/v2/hooks/useMapInChina.d.ts +1 -0
- package/dist/v2/hooks/useMapInChina.js +28 -2
- package/dist/v2/hooks/useMapPlace.js +3 -3
- package/dist/v2/hooks/useMapRecomendPlace.js +2 -1
- package/dist/v2/hooks/useMapSupplier.d.ts +2 -0
- package/dist/v2/hooks/useResizeObserver.d.ts +1 -0
- package/dist/v2/hooks/useResizeObserver.js +3 -1
- package/dist/v2/hooks/useWalkingRoute.js +21 -60
- package/dist/v2/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
- package/dist/v2/index.js +1 -1
- package/dist/v2/types/interface.d.ts +5 -0
- package/dist/v2/utils/compatibleDrivingRoute.d.ts +5 -0
- package/dist/v2/utils/compatibleDrivingRoute.js +130 -0
- package/dist/v2/utils/compatibleGoogleTypes.d.ts +11 -0
- package/dist/v2/utils/compatibleGoogleTypes.js +38 -0
- package/dist/v2/utils/compatibleGraspRoad.d.ts +8 -0
- package/dist/v2/utils/compatibleGraspRoad.js +67 -0
- package/dist/v2/utils/compatibleWalkingRoute.d.ts +5 -0
- package/dist/v2/utils/compatibleWalkingRoute.js +81 -0
- package/dist/v2/utils/log.js +1 -1
- package/dist/v2/utils/transform.d.ts +3 -1
- package/dist/v2/utils/transform.js +46 -5
- package/dist/v2/utils/typeChecking.d.ts +3 -1
- package/dist/v2/utils/typeChecking.js +5 -0
- package/dist/v3/Demo/DemoBusinessRecomendPlace.js +1 -1
- package/dist/v3/api/contants.d.ts +3 -3
- package/dist/v3/api/contants.js +3 -3
- package/dist/v3/api/googleDirections.d.ts +26 -0
- package/dist/v3/api/googleDirections.js +139 -0
- package/dist/v3/api/googleSnapRoad.d.ts +0 -1
- package/dist/v3/api/googleSnapRoad.js +6 -14
- package/dist/v3/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.js +1 -1
- package/dist/v3/business-components/BusinessRecomendPlaceMap/index.js +1 -1
- package/dist/v3/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.js +4 -3
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +0 -1
- package/dist/v3/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.js +1 -3
- package/dist/v3/chunks/{BusinessRecomendPlaceMap.d14dbe4e.js → BusinessRecomendPlaceMap.8ce05cf5.js} +3 -2
- package/dist/v3/components/Gmap/Gmap.js +8 -2
- package/dist/v3/components/MapProvider/MapProvider.d.ts +1 -1
- package/dist/v3/components/MapProvider/MapProvider.js +6 -2
- package/dist/v3/hooks/useDrivingRoute.js +5 -82
- package/dist/v3/hooks/useMapAngle.d.ts +4 -3
- package/dist/v3/hooks/useMapCoordinatify.js +1 -1
- package/dist/v3/hooks/useMapFitView.js +4 -2
- package/dist/v3/hooks/useMapGraspRoad.d.ts +5 -8
- package/dist/v3/hooks/useMapGraspRoad.js +9 -60
- package/dist/v3/hooks/useMapInChina.d.ts +1 -0
- package/dist/v3/hooks/useMapInChina.js +28 -2
- package/dist/v3/hooks/useMapPlace.js +3 -3
- package/dist/v3/hooks/useMapRecomendPlace.js +2 -1
- package/dist/v3/hooks/useMapSupplier.d.ts +2 -0
- package/dist/v3/hooks/useResizeObserver.d.ts +1 -0
- package/dist/v3/hooks/useResizeObserver.js +3 -1
- package/dist/v3/hooks/useWalkingRoute.js +21 -60
- package/dist/v3/hooks-business/useBusinessRecomendPlaceMap.js +1 -1
- package/dist/v3/index.js +1 -1
- package/dist/v3/types/interface.d.ts +5 -0
- package/dist/v3/utils/compatibleDrivingRoute.d.ts +5 -0
- package/dist/v3/utils/compatibleDrivingRoute.js +130 -0
- package/dist/v3/utils/compatibleGoogleTypes.d.ts +11 -0
- package/dist/v3/utils/compatibleGoogleTypes.js +38 -0
- package/dist/v3/utils/compatibleGraspRoad.d.ts +8 -0
- package/dist/v3/utils/compatibleGraspRoad.js +67 -0
- package/dist/v3/utils/compatibleWalkingRoute.d.ts +5 -0
- package/dist/v3/utils/compatibleWalkingRoute.js +81 -0
- package/dist/v3/utils/log.js +1 -1
- package/dist/v3/utils/transform.d.ts +3 -1
- package/dist/v3/utils/transform.js +46 -5
- package/dist/v3/utils/typeChecking.d.ts +3 -1
- package/dist/v3/utils/typeChecking.js +5 -0
- package/package.json +2 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { apiGoogleDirections } from "../api/googleDirections.js";
|
|
2
|
+
const isIgnoredAmapTimeoutError = (err) => err === "RETURN_TIMEOUT";
|
|
3
|
+
function amapJsApiWalkingRoute(from, to, amapWalking) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
amapWalking.search(AMap.LngLat.from(from), AMap.LngLat.from(to), (status, result) => {
|
|
6
|
+
switch (status) {
|
|
7
|
+
case "complete": {
|
|
8
|
+
let path = [];
|
|
9
|
+
const walkingResult = result;
|
|
10
|
+
if (!walkingResult.routes) {
|
|
11
|
+
return resolve([]);
|
|
12
|
+
}
|
|
13
|
+
const firstRoute = walkingResult.routes[0];
|
|
14
|
+
for (const step of firstRoute.steps) {
|
|
15
|
+
const stepPath = step.path.map(({ lng, lat }) => [lng, lat]);
|
|
16
|
+
path = path.concat(stepPath);
|
|
17
|
+
}
|
|
18
|
+
return resolve(path);
|
|
19
|
+
}
|
|
20
|
+
case "no_data":
|
|
21
|
+
return resolve([]);
|
|
22
|
+
default:
|
|
23
|
+
if (isIgnoredAmapTimeoutError(result)) {
|
|
24
|
+
console.warn(result);
|
|
25
|
+
return resolve([]);
|
|
26
|
+
}
|
|
27
|
+
return reject(result);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function gmapJsApiWalkingRoute(from, to, gmapDirectionsService) {
|
|
33
|
+
return new Promise((resolve, reject) => {
|
|
34
|
+
gmapDirectionsService.route(
|
|
35
|
+
{
|
|
36
|
+
origin: { lng: from[0], lat: from[1] },
|
|
37
|
+
destination: { lng: to[0], lat: to[1] },
|
|
38
|
+
travelMode: google.maps.TravelMode.WALKING
|
|
39
|
+
},
|
|
40
|
+
(result, status) => {
|
|
41
|
+
switch (status) {
|
|
42
|
+
case "OK": {
|
|
43
|
+
const { overview_path } = result.routes[0];
|
|
44
|
+
const path = overview_path.map(({ lng, lat }) => [lng(), lat()]);
|
|
45
|
+
return resolve(path);
|
|
46
|
+
}
|
|
47
|
+
case "ZERO_RESULTS":
|
|
48
|
+
case "NOT_FOUND":
|
|
49
|
+
return resolve([]);
|
|
50
|
+
default:
|
|
51
|
+
return reject(new Error(status));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async function googleServiceApiWalkingRoute(from, to, proxyUrl) {
|
|
58
|
+
const { status, routes, error_message } = await apiGoogleDirections({
|
|
59
|
+
proxyUrl,
|
|
60
|
+
mode: "WALKING",
|
|
61
|
+
origin: from,
|
|
62
|
+
destination: to
|
|
63
|
+
});
|
|
64
|
+
switch (status) {
|
|
65
|
+
case "OK": {
|
|
66
|
+
const { overview_path } = routes[0];
|
|
67
|
+
const path = overview_path.map(({ lng, lat }) => [lng(), lat()]);
|
|
68
|
+
return path;
|
|
69
|
+
}
|
|
70
|
+
case "ZERO_RESULTS":
|
|
71
|
+
case "NOT_FOUND":
|
|
72
|
+
return [];
|
|
73
|
+
default:
|
|
74
|
+
throw Error(error_message != null ? error_message : status);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
amapJsApiWalkingRoute,
|
|
79
|
+
gmapJsApiWalkingRoute,
|
|
80
|
+
googleServiceApiWalkingRoute
|
|
81
|
+
};
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.
|
|
3
|
+
const pkgVersion = "2.6.0";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|
|
@@ -8,6 +8,7 @@ export declare const lnglat2point: ({ lng, lat }: {
|
|
|
8
8
|
lng: number;
|
|
9
9
|
lat: number;
|
|
10
10
|
}) => Point;
|
|
11
|
+
export declare const googlePointsStringify: (points: Point[]) => string;
|
|
11
12
|
export interface AsteriskItem {
|
|
12
13
|
type: "normal" | "emphasize";
|
|
13
14
|
value: string;
|
|
@@ -27,7 +28,7 @@ export declare const isPointEqual: (p1: Point, p2?: Point) => boolean;
|
|
|
27
28
|
export declare const isGeoPositionEqual: (p1: GeolocationPosition, p2?: GeolocationPosition) => boolean;
|
|
28
29
|
export declare const isZoneEqual: (z1: Zone, z2?: Zone) => boolean;
|
|
29
30
|
interface AmapPlaceName2DisplayNameOptions extends AMap.AddressComponent {
|
|
30
|
-
|
|
31
|
+
isChinese: boolean;
|
|
31
32
|
}
|
|
32
33
|
export declare const amapPlaceName2DisplayName: (name: string, options: AmapPlaceName2DisplayNameOptions) => string;
|
|
33
34
|
export declare function gmapPlaceName2DisplayName(name: string, addressComponents: google.maps.GeocoderAddressComponent[]): string;
|
|
@@ -42,4 +43,5 @@ export declare const businessCandidatesToAdsorptionPlace: (places: Place[]) => P
|
|
|
42
43
|
type MaybeFunctionToFunction<T> = T extends (...args: any) => any ? T : () => T;
|
|
43
44
|
export declare const maybeFunctionToFunction: <T>(value: T) => MaybeFunctionToFunction<T>;
|
|
44
45
|
export declare const signal2promise: (signal?: AbortSignal) => Promise<any>;
|
|
46
|
+
export declare const googleEncodedPolyline2googleLatLng: (value: string) => google.maps.LatLng[];
|
|
45
47
|
export {};
|
|
@@ -1,10 +1,46 @@
|
|
|
1
1
|
import { MIN_ANIMATION_DURATION, ANIMATION_DURATION_FOR_100VW, ANIMATION_DURATION_PER_ZOOM } from "../api/contants.js";
|
|
2
|
+
import { GoogleLatLng } from "./compatibleGoogleTypes.js";
|
|
2
3
|
import { BRWOSER_PLATFORM } from "./platform.js";
|
|
4
|
+
var decode = function(encodedPath, precision) {
|
|
5
|
+
if (precision === void 0) {
|
|
6
|
+
precision = 5;
|
|
7
|
+
}
|
|
8
|
+
var factor = Math.pow(10, precision);
|
|
9
|
+
var len = encodedPath.length;
|
|
10
|
+
var path = new Array(Math.floor(encodedPath.length / 2));
|
|
11
|
+
var index = 0;
|
|
12
|
+
var lat = 0;
|
|
13
|
+
var lng = 0;
|
|
14
|
+
var pointIndex = 0;
|
|
15
|
+
for (; index < len; ++pointIndex) {
|
|
16
|
+
var result = 1;
|
|
17
|
+
var shift = 0;
|
|
18
|
+
var b = void 0;
|
|
19
|
+
do {
|
|
20
|
+
b = encodedPath.charCodeAt(index++) - 63 - 1;
|
|
21
|
+
result += b << shift;
|
|
22
|
+
shift += 5;
|
|
23
|
+
} while (b >= 31);
|
|
24
|
+
lat += result & 1 ? ~(result >> 1) : result >> 1;
|
|
25
|
+
result = 1;
|
|
26
|
+
shift = 0;
|
|
27
|
+
do {
|
|
28
|
+
b = encodedPath.charCodeAt(index++) - 63 - 1;
|
|
29
|
+
result += b << shift;
|
|
30
|
+
shift += 5;
|
|
31
|
+
} while (b >= 31);
|
|
32
|
+
lng += result & 1 ? ~(result >> 1) : result >> 1;
|
|
33
|
+
path[pointIndex] = [lat / factor, lng / factor];
|
|
34
|
+
}
|
|
35
|
+
path.length = pointIndex;
|
|
36
|
+
return path;
|
|
37
|
+
};
|
|
3
38
|
const vec2lnglat = ([lng, lat]) => ({
|
|
4
39
|
lng: Number(lng),
|
|
5
40
|
lat: Number(lat)
|
|
6
41
|
});
|
|
7
42
|
const lnglat2point = ({ lng, lat }) => [lng, lat];
|
|
43
|
+
const googlePointsStringify = (points) => points.map(([lng, lat]) => `${lat},${lng}`).join("|");
|
|
8
44
|
const decodeAsterisk = (encodedValue) => {
|
|
9
45
|
const result = [];
|
|
10
46
|
const tokens = encodedValue.split("*");
|
|
@@ -77,12 +113,12 @@ const isZoneEqual = (z1, z2) => {
|
|
|
77
113
|
return z1.name === (z2 == null ? void 0 : z2.name) && z1.path.every((point, idx) => isPointEqual(point, z2 == null ? void 0 : z2.path[idx]));
|
|
78
114
|
};
|
|
79
115
|
const amapPlaceName2DisplayName = (name, options) => {
|
|
80
|
-
const {
|
|
116
|
+
const { isChinese } = options;
|
|
81
117
|
if (!name)
|
|
82
118
|
return name;
|
|
83
|
-
return
|
|
119
|
+
return isChinese ? amapPlaceName2DisplayNameInChinese(name, options) : amapPlaceName2DisplayNameOutChinese(name, options);
|
|
84
120
|
};
|
|
85
|
-
function
|
|
121
|
+
function amapPlaceName2DisplayNameInChinese(name, options) {
|
|
86
122
|
const { province, city, district, township, building, neighborhood } = options;
|
|
87
123
|
if (building)
|
|
88
124
|
return building;
|
|
@@ -101,7 +137,7 @@ function amapPlaceName2DisplayNameInChina(name, options) {
|
|
|
101
137
|
return replacedName.trim() ? replacedName : result;
|
|
102
138
|
}
|
|
103
139
|
const NOT_ONLY_NUMBERS_REGEX = /[^\d\s-]/;
|
|
104
|
-
function
|
|
140
|
+
function amapPlaceName2DisplayNameOutChinese(name, options) {
|
|
105
141
|
const { adcode, province, city, district, township, street, streetNumber } = options;
|
|
106
142
|
if (street === "Unnamed Road")
|
|
107
143
|
return name;
|
|
@@ -183,7 +219,7 @@ const distanceVw2animationDuration = (distance) => {
|
|
|
183
219
|
return Math.max(MIN_ANIMATION_DURATION, ANIMATION_DURATION_FOR_100VW * distance / 100);
|
|
184
220
|
};
|
|
185
221
|
const deltaZoom2animationDuration = (deltaZoom) => {
|
|
186
|
-
return Math.max(MIN_ANIMATION_DURATION *
|
|
222
|
+
return Math.max(MIN_ANIMATION_DURATION * 2, Math.abs(deltaZoom) * ANIMATION_DURATION_PER_ZOOM);
|
|
187
223
|
};
|
|
188
224
|
const wxGetLocationSuccessResponse2GeolocationPosition = (res) => {
|
|
189
225
|
const { longitude, latitude, accuracy } = res;
|
|
@@ -248,6 +284,9 @@ const signal2promise = (signal) => {
|
|
|
248
284
|
signal == null ? void 0 : signal.addEventListener("abort", () => reject(signal.reason));
|
|
249
285
|
});
|
|
250
286
|
};
|
|
287
|
+
const googleEncodedPolyline2googleLatLng = (value) => {
|
|
288
|
+
return decode(value).map(([lat, lng]) => new GoogleLatLng({ lng, lat }));
|
|
289
|
+
};
|
|
251
290
|
export {
|
|
252
291
|
alipayMyGetLocationError2GeolocationPositionErrorCode,
|
|
253
292
|
alipayMyGetLocationSuccessResponse2GeolocationPosition,
|
|
@@ -259,6 +298,8 @@ export {
|
|
|
259
298
|
distanceVw2animationDuration,
|
|
260
299
|
geoPositionError2businessTimeout,
|
|
261
300
|
gmapPlaceName2DisplayName,
|
|
301
|
+
googleEncodedPolyline2googleLatLng,
|
|
302
|
+
googlePointsStringify,
|
|
262
303
|
isGeoPositionEqual,
|
|
263
304
|
isPlaceEqual,
|
|
264
305
|
isPointEqual,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CoordinatePlace, CoordinatePoint, CoordinateRecommendZonePlaces, CoordinateTrackPoint, CoordinateType, CoordinateZone, RecommendType } from "../types/interface";
|
|
1
|
+
import type { CoordinatePlace, CoordinatePoint, CoordinateRecommendZonePlaces, CoordinateTrackPoint, CoordinateType, CoordinateZone, ProxyServiceError, RecommendType } from "../types/interface";
|
|
2
|
+
export declare const createTypeError: (typeName: string, value: unknown, detail?: string) => Error;
|
|
2
3
|
export declare function isCoordinateType(type: unknown): type is CoordinateType;
|
|
3
4
|
export declare function isRecommendType(type: unknown): type is RecommendType;
|
|
4
5
|
export declare function toRecommendType(type: unknown): RecommendType;
|
|
@@ -40,4 +41,5 @@ interface MaybeCoordinateTrackPoint {
|
|
|
40
41
|
timestamp?: number | string;
|
|
41
42
|
}
|
|
42
43
|
export declare const toCoordinateTrackPoint: (value?: MaybeCoordinateTrackPoint) => CoordinateTrackPoint;
|
|
44
|
+
export declare function isProxyServiceError(error: unknown): error is ProxyServiceError;
|
|
43
45
|
export {};
|
|
@@ -105,10 +105,15 @@ const toCoordinateTrackPoint = (value) => {
|
|
|
105
105
|
}
|
|
106
106
|
return { lng, lat, type, angle, speed, timestamp };
|
|
107
107
|
};
|
|
108
|
+
function isProxyServiceError(error) {
|
|
109
|
+
return !!error && typeof error === "object" && "msg" in error && "code" in error;
|
|
110
|
+
}
|
|
108
111
|
export {
|
|
109
112
|
assertNoConflictTypeAndZone,
|
|
113
|
+
createTypeError,
|
|
110
114
|
isCoordinatePoint,
|
|
111
115
|
isCoordinateType,
|
|
116
|
+
isProxyServiceError,
|
|
112
117
|
isRecommendType,
|
|
113
118
|
toCoordinatePlaceType,
|
|
114
119
|
toCoordinatePointType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
|
-
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.
|
|
2
|
+
import { B as BusinessRecomendPlaceMap } from "../chunks/BusinessRecomendPlaceMap.8ce05cf5.js";
|
|
3
3
|
import { useBusinessRecomendPlaceMap } from "../hooks-business/useBusinessRecomendPlaceMap.js";
|
|
4
4
|
import { defineSetup } from "../types/helper.js";
|
|
5
5
|
import { d as demo } from "../chunks/Demo.css.e921a2f6.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Point } from "../types/interface";
|
|
2
2
|
export declare const MAX_ANIMATION_DISTANCE_VW = 300;
|
|
3
|
-
export declare const MIN_ANIMATION_DURATION =
|
|
4
|
-
export declare const ANIMATION_DURATION_FOR_100VW =
|
|
5
|
-
export declare const ANIMATION_DURATION_PER_ZOOM =
|
|
3
|
+
export declare const MIN_ANIMATION_DURATION = 200;
|
|
4
|
+
export declare const ANIMATION_DURATION_FOR_100VW = 100;
|
|
5
|
+
export declare const ANIMATION_DURATION_PER_ZOOM = 200;
|
|
6
6
|
export declare const BEIJIN_POINT: Point;
|
|
7
7
|
export declare const MAX_DEVIATION_DISTANCE = 30;
|
|
8
8
|
export declare const CAR_DISTANCE_MIN = 100;
|
package/dist/v3/api/contants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const MAX_ANIMATION_DISTANCE_VW = 300;
|
|
2
|
-
const MIN_ANIMATION_DURATION =
|
|
3
|
-
const ANIMATION_DURATION_FOR_100VW =
|
|
4
|
-
const ANIMATION_DURATION_PER_ZOOM =
|
|
2
|
+
const MIN_ANIMATION_DURATION = 200;
|
|
3
|
+
const ANIMATION_DURATION_FOR_100VW = 100;
|
|
4
|
+
const ANIMATION_DURATION_PER_ZOOM = 200;
|
|
5
5
|
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
6
6
|
const MAX_DEVIATION_DISTANCE = 30;
|
|
7
7
|
const CAR_DISTANCE_MIN = 100;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import type { Point } from "../types/interface";
|
|
3
|
+
type DirectionsStatus = `${google.maps.DirectionsStatus}`;
|
|
4
|
+
export interface GoogleDirectionsResponse extends Pick<google.maps.DirectionsResult, "routes" | "geocoded_waypoints" | "available_travel_modes"> {
|
|
5
|
+
status: DirectionsStatus;
|
|
6
|
+
error_message?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ApiGoogleDirectionsProps {
|
|
9
|
+
proxyUrl?: string;
|
|
10
|
+
origin: Point;
|
|
11
|
+
destination: Point;
|
|
12
|
+
waypoints?: Point[];
|
|
13
|
+
mode?: `${google.maps.TravelMode}`;
|
|
14
|
+
traffic_model?: `${google.maps.TrafficModel}`;
|
|
15
|
+
alternatives?: boolean;
|
|
16
|
+
arrival_time?: number;
|
|
17
|
+
departure_time?: number;
|
|
18
|
+
avoid?: ("tolls" | "highways" | "ferries" | "indoor")[];
|
|
19
|
+
language?: string;
|
|
20
|
+
region?: string;
|
|
21
|
+
units?: "metric" | "imperial";
|
|
22
|
+
transit_mode?: `${google.maps.TransitMode}`;
|
|
23
|
+
transit_routing_preference?: `${google.maps.TransitRoutePreference}`;
|
|
24
|
+
}
|
|
25
|
+
export declare function apiGoogleDirections(props: ApiGoogleDirectionsProps): Promise<GoogleDirectionsResponse>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { googlePointsStringify, googleEncodedPolyline2googleLatLng } from "../utils/transform.js";
|
|
2
|
+
import { isProxyServiceError, createTypeError } from "../utils/typeChecking.js";
|
|
3
|
+
const ALL_DIRECTIONS_STATUS = [
|
|
4
|
+
"INVALID_REQUEST",
|
|
5
|
+
"MAX_WAYPOINTS_EXCEEDED",
|
|
6
|
+
"NOT_FOUND",
|
|
7
|
+
"OK",
|
|
8
|
+
"OVER_QUERY_LIMIT",
|
|
9
|
+
"REQUEST_DENIED",
|
|
10
|
+
"UNKNOWN_ERROR",
|
|
11
|
+
"ZERO_RESULTS"
|
|
12
|
+
];
|
|
13
|
+
function isGoogleDistance(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && "text" in value && typeof value.text === "string" && "value" in value && typeof value.value === "number";
|
|
15
|
+
}
|
|
16
|
+
function isGoogleDuration(value) {
|
|
17
|
+
return typeof value === "object" && value !== null && "text" in value && typeof value.text === "string" && "value" in value && typeof value.value === "number";
|
|
18
|
+
}
|
|
19
|
+
function isGoogleDirectionsPolyline(value) {
|
|
20
|
+
return typeof value === "object" && value !== null && "points" in value && typeof value.points === "string";
|
|
21
|
+
}
|
|
22
|
+
function isMeasurableObject(value) {
|
|
23
|
+
return typeof value === "object" && value !== null && (!("distance" in value) || value.distance === void 0 || isGoogleDistance(value.distance)) && (!("duration" in value) || value.duration === void 0 || isGoogleDuration(value.duration));
|
|
24
|
+
}
|
|
25
|
+
function assertGoogleDirectionsStep(value) {
|
|
26
|
+
const error = createTypeError("google.maps.DirectionsStep", value);
|
|
27
|
+
if (!isMeasurableObject(value))
|
|
28
|
+
throw error;
|
|
29
|
+
if (!("polyline" in value)) {
|
|
30
|
+
value.path = [];
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (!isGoogleDirectionsPolyline(value.polyline))
|
|
34
|
+
throw error;
|
|
35
|
+
value.path = googleEncodedPolyline2googleLatLng(
|
|
36
|
+
value.polyline.points
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function assertGoogleDirectionsLeg(value) {
|
|
40
|
+
if (!isMeasurableObject(value) || !("steps" in value) || !Array.isArray(value.steps))
|
|
41
|
+
throw createTypeError("google.maps.DirectionsLeg", value);
|
|
42
|
+
try {
|
|
43
|
+
for (const step of value.steps) {
|
|
44
|
+
assertGoogleDirectionsStep(step);
|
|
45
|
+
}
|
|
46
|
+
} catch (error) {
|
|
47
|
+
const { message: detail } = error;
|
|
48
|
+
throw createTypeError("google.maps.DirectionsLeg", value, detail);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function assertGoogleDirectionsRoute(value) {
|
|
52
|
+
if (typeof value !== "object" || value === null || !("legs" in value) || !Array.isArray(value.legs) || !("overview_polyline" in value) || !isGoogleDirectionsPolyline(value.overview_polyline))
|
|
53
|
+
throw createTypeError("google.maps.DirectionsRoute", value);
|
|
54
|
+
value.overview_path = googleEncodedPolyline2googleLatLng(
|
|
55
|
+
value.overview_polyline.points
|
|
56
|
+
);
|
|
57
|
+
try {
|
|
58
|
+
for (const leg of value.legs) {
|
|
59
|
+
assertGoogleDirectionsLeg(leg);
|
|
60
|
+
}
|
|
61
|
+
} catch (error) {
|
|
62
|
+
const { message: detail } = error;
|
|
63
|
+
throw createTypeError("google.maps.DirectionsRoute", value, detail);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function assertGoogleDirectionsResponse(value) {
|
|
67
|
+
if (typeof value !== "object" || value === null || !("status" in value) || !("routes" in value) || !isGoogleDirectionsStatus(value.status) || !Array.isArray(value.routes))
|
|
68
|
+
throw createTypeError("GoogleDirectionsResponse", value);
|
|
69
|
+
try {
|
|
70
|
+
for (const route of value.routes) {
|
|
71
|
+
assertGoogleDirectionsRoute(route);
|
|
72
|
+
}
|
|
73
|
+
} catch (error) {
|
|
74
|
+
const { message: detail } = error;
|
|
75
|
+
throw createTypeError("GoogleDirectionsResponse", value, detail);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function isGoogleDirectionsStatus(value) {
|
|
79
|
+
return typeof value === "string" && ALL_DIRECTIONS_STATUS.includes(value);
|
|
80
|
+
}
|
|
81
|
+
function isGoogleDirectionsError(error) {
|
|
82
|
+
return typeof error === "object" && !!error && "status" in error && isGoogleDirectionsStatus(error.status) && "error_message" in error;
|
|
83
|
+
}
|
|
84
|
+
async function apiGoogleDirections(props) {
|
|
85
|
+
const { proxyUrl, origin, destination, waypoints, avoid } = props;
|
|
86
|
+
if (!proxyUrl)
|
|
87
|
+
return {
|
|
88
|
+
status: "ZERO_RESULTS",
|
|
89
|
+
routes: [],
|
|
90
|
+
error_message: "Warning: google directions service is bypassed due to proxyUrl is not provided!"
|
|
91
|
+
};
|
|
92
|
+
const { protocol, host } = location;
|
|
93
|
+
const baseUrl = proxyUrl.startsWith(protocol) ? void 0 : `${protocol}//${host}`;
|
|
94
|
+
const url = new URL(proxyUrl, baseUrl);
|
|
95
|
+
url.searchParams.set("origin", googlePointsStringify([origin]));
|
|
96
|
+
url.searchParams.set("destination", googlePointsStringify([destination]));
|
|
97
|
+
if (waypoints && waypoints.length > 0)
|
|
98
|
+
url.searchParams.set("waypoints", googlePointsStringify(waypoints));
|
|
99
|
+
if (avoid && avoid.length > 0)
|
|
100
|
+
url.searchParams.set("avoid", avoid.join("|"));
|
|
101
|
+
for (const key of [
|
|
102
|
+
"mode",
|
|
103
|
+
"traffic_model",
|
|
104
|
+
"alternatives",
|
|
105
|
+
"arrival_time",
|
|
106
|
+
"departure_time",
|
|
107
|
+
"language",
|
|
108
|
+
"region",
|
|
109
|
+
"units",
|
|
110
|
+
"transit_mode",
|
|
111
|
+
"transit_routing_preference"
|
|
112
|
+
]) {
|
|
113
|
+
if (props[key] !== void 0)
|
|
114
|
+
url.searchParams.set(key, String(key));
|
|
115
|
+
}
|
|
116
|
+
const response = await fetch(url);
|
|
117
|
+
if (response.ok) {
|
|
118
|
+
const result = await response.json();
|
|
119
|
+
assertGoogleDirectionsResponse(result);
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
const error = await response.json();
|
|
123
|
+
if (isProxyServiceError(error)) {
|
|
124
|
+
const { code, msg } = error;
|
|
125
|
+
throw new Error(`apiGoogleDirections proxy failed code: ${code}, msg:
|
|
126
|
+
${msg}`);
|
|
127
|
+
}
|
|
128
|
+
if (isGoogleDirectionsError(error)) {
|
|
129
|
+
const { status, error_message } = error;
|
|
130
|
+
throw new Error(`apiGoogleDirections failed status: ${status}, message:
|
|
131
|
+
${error_message}`);
|
|
132
|
+
}
|
|
133
|
+
throw new Error(
|
|
134
|
+
`apiGoogleSnapRoad failed with unrecognized server response: ${JSON.stringify(error)}`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
apiGoogleDirections
|
|
139
|
+
};
|
|
@@ -18,5 +18,4 @@ export interface ApiGoogleSnapRoadProps {
|
|
|
18
18
|
proxyUrl?: string;
|
|
19
19
|
}
|
|
20
20
|
export declare function apiGoogleSnapRoad(props: ApiGoogleSnapRoadProps): Promise<SnapToRoadsResponse>;
|
|
21
|
-
export declare const setGlobalGoogleSnapRoadProxyUrl: (url?: string) => void;
|
|
22
21
|
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function isProxyError(error) {
|
|
4
|
-
return !!error && typeof error === "object" && "msg" in error && "code" in error;
|
|
5
|
-
}
|
|
1
|
+
import { googlePointsStringify } from "../utils/transform.js";
|
|
2
|
+
import { isProxyServiceError } from "../utils/typeChecking.js";
|
|
6
3
|
const point2snappedPoint = (point) => {
|
|
7
4
|
const [longitude, latitude] = point;
|
|
8
5
|
return { location: { longitude, latitude }, placeId: "" };
|
|
@@ -34,7 +31,7 @@ function assertSnapToRoadsResponse(value) {
|
|
|
34
31
|
value.snappedPoints.forEach(assertSnappedPoint);
|
|
35
32
|
}
|
|
36
33
|
async function apiGoogleSnapRoad(props) {
|
|
37
|
-
const { interpolate, path, proxyUrl
|
|
34
|
+
const { interpolate, path, proxyUrl } = props;
|
|
38
35
|
if (!proxyUrl)
|
|
39
36
|
return {
|
|
40
37
|
snappedPoints: path.map(point2snappedPoint),
|
|
@@ -45,7 +42,7 @@ async function apiGoogleSnapRoad(props) {
|
|
|
45
42
|
const url = new URL(proxyUrl, baseUrl);
|
|
46
43
|
if (interpolate !== void 0)
|
|
47
44
|
url.searchParams.set("interpolate", String(interpolate));
|
|
48
|
-
url.searchParams.set("path",
|
|
45
|
+
url.searchParams.set("path", googlePointsStringify(path));
|
|
49
46
|
const response = await fetch(url);
|
|
50
47
|
if (response.ok) {
|
|
51
48
|
const result = await response.json();
|
|
@@ -53,7 +50,7 @@ async function apiGoogleSnapRoad(props) {
|
|
|
53
50
|
return result;
|
|
54
51
|
}
|
|
55
52
|
const error = await response.json();
|
|
56
|
-
if (
|
|
53
|
+
if (isProxyServiceError(error)) {
|
|
57
54
|
const { code: code2, msg } = error;
|
|
58
55
|
throw new Error(`apiGoogleSnapRoad proxy failed code: ${code2}, msg:
|
|
59
56
|
${msg}`);
|
|
@@ -64,11 +61,6 @@ ${msg}`);
|
|
|
64
61
|
${message}`
|
|
65
62
|
);
|
|
66
63
|
}
|
|
67
|
-
const setGlobalGoogleSnapRoadProxyUrl = (url) => {
|
|
68
|
-
if (url)
|
|
69
|
-
googleSnapRoadProxyUrl = url;
|
|
70
|
-
};
|
|
71
64
|
export {
|
|
72
|
-
apiGoogleSnapRoad
|
|
73
|
-
setGlobalGoogleSnapRoadProxyUrl
|
|
65
|
+
apiGoogleSnapRoad
|
|
74
66
|
};
|
|
@@ -27,7 +27,7 @@ import "../GreenZone/GreenZone.js";
|
|
|
27
27
|
import "../PassengerCircle/PassengerCircle.js";
|
|
28
28
|
import "../PickupPoints/PickupPoints.js";
|
|
29
29
|
import "./useCacheCenterPlace.js";
|
|
30
|
-
import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.
|
|
30
|
+
import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.8ce05cf5.js";
|
|
31
31
|
export {
|
|
32
32
|
B as BusinessRecomendPlaceMap,
|
|
33
33
|
f as BusinessRecomendPlaceMapInner,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.
|
|
1
|
+
import { B, f, D, E, R, c, a, e, b, d, Z } from "../../chunks/BusinessRecomendPlaceMap.8ce05cf5.js";
|
|
2
2
|
export {
|
|
3
3
|
B as BusinessRecomendPlaceMap,
|
|
4
4
|
f as BusinessRecomendPlaceMapInner,
|
|
@@ -21,7 +21,7 @@ import { detectBrowserPlatform } from "../../utils/platform.js";
|
|
|
21
21
|
import { place2point, isPlaceEqual, isZoneEqual, geoPositionError2businessTimeout, pipeDefer } from "../../utils/transform.js";
|
|
22
22
|
import { toCoordinatePlaceType, toCoordinatePointType, toCoordinateRecommendZonePlacesType } from "../../utils/typeChecking.js";
|
|
23
23
|
import { AbsoluteAddressBox } from "../AbsoluteAddressBox/AbsoluteAddressBox.js";
|
|
24
|
-
import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING } from "../../chunks/BusinessRecomendPlaceMap.
|
|
24
|
+
import { E as EMPTY_PLACE, m as memoize, R as RECOMMEND_PLACE_DRAG_LIMIT, a as RECOMMEND_PLACE_LARGE_LIMIT, b as RECOMMEND_PLACE_ZONE_ICON_MIN, c as RECOMMEND_PLACE_ICON_ZOOM_MIN, d as RECOMMEND_PLACE_ZONE_TEXT_MIN, e as RECOMMEND_PLACE_TEXT_ZOOM_MIN, D as DEFAULT_ZOOM, Z as ZONE_FITVIEW_PANDING } from "../../chunks/BusinessRecomendPlaceMap.8ce05cf5.js";
|
|
25
25
|
import { DeviceOrientation } from "../DeviceOrientation/DeviceOrientation.js";
|
|
26
26
|
import { GreenZone } from "../GreenZone/GreenZone.js";
|
|
27
27
|
import { PassengerCircle } from "../PassengerCircle/PassengerCircle.js";
|
|
@@ -228,7 +228,8 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
228
228
|
inputPlace,
|
|
229
229
|
type,
|
|
230
230
|
zone,
|
|
231
|
-
isSameZone
|
|
231
|
+
isSameZone,
|
|
232
|
+
noAnimation
|
|
232
233
|
}) => {
|
|
233
234
|
var _a;
|
|
234
235
|
centerSource.source = "recomend";
|
|
@@ -238,7 +239,7 @@ const BusinessReselectPlaceMapInner = defineSetup("BusinessReselectPlaceMapInner
|
|
|
238
239
|
...place
|
|
239
240
|
});
|
|
240
241
|
if ((type === "Restricted" || type === "Forbidden") && !isSameZone)
|
|
241
|
-
setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path);
|
|
242
|
+
setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path, place2point(place), noAnimation);
|
|
242
243
|
emit("changeRecomandPlace", coordinatifyValueOfOnChangeRecommendPlace({
|
|
243
244
|
place,
|
|
244
245
|
inputPlace,
|
|
@@ -12,7 +12,6 @@ export type BusinessTaxiServiceMapProps = CoordinatifyProps<Omit<HeycarMapProps,
|
|
|
12
12
|
driverStatus: DriverStatus;
|
|
13
13
|
interval: number;
|
|
14
14
|
disablePassenger?: boolean;
|
|
15
|
-
googleSnapRoadProxyUrl?: string;
|
|
16
15
|
mapContext: CoordinatifyProps<BusinessTaxiServiceContext>;
|
|
17
16
|
renderStartSerivceTitle: (titleProps: {
|
|
18
17
|
distance: number;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createVNode } from "vue";
|
|
2
2
|
import { ref, watch, onUnmounted } from "vue-demi";
|
|
3
3
|
import { apiGetAuxiliaryGrapStatus } from "../../api/browser.js";
|
|
4
|
-
import { setGlobalGoogleSnapRoadProxyUrl } from "../../api/googleSnapRoad.js";
|
|
5
4
|
import { HeycarMap } from "../../components/MapProvider/MapProvider.js";
|
|
6
5
|
import { createElement } from "../../demi-polyfill/demi-polyfill.js";
|
|
7
6
|
import { useGeoLocation } from "../../hooks/useGeoLocation.js";
|
|
@@ -30,7 +29,6 @@ const BusinessTaxiServiceMapInner = defineSetup("BusinessTaxiServiceMapInner", f
|
|
|
30
29
|
renderStartSerivceTitle,
|
|
31
30
|
renderInServiceTitle
|
|
32
31
|
} = props;
|
|
33
|
-
setGlobalGoogleSnapRoadProxyUrl(props.googleSnapRoadProxyUrl);
|
|
34
32
|
const {
|
|
35
33
|
mapRef,
|
|
36
34
|
setMap,
|
|
@@ -210,7 +208,7 @@ const BusinessTaxiServiceMap = defineLagecySetup("BusinessTaxiServiceMap", funct
|
|
|
210
208
|
attrs: props,
|
|
211
209
|
key: `${payload.supplier}${instanceNo}`
|
|
212
210
|
});
|
|
213
|
-
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "
|
|
211
|
+
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPositionTrack", "interval", "disablePassenger", "loading", "mapContext", "renderInServiceTitle", "renderStartSerivceTitle", "to"]);
|
|
214
212
|
export {
|
|
215
213
|
BusinessTaxiServiceMap,
|
|
216
214
|
BusinessTaxiServiceMapInner
|
package/dist/v3/chunks/{BusinessRecomendPlaceMap.d14dbe4e.js → BusinessRecomendPlaceMap.8ce05cf5.js}
RENAMED
|
@@ -502,7 +502,8 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
502
502
|
inputPlace,
|
|
503
503
|
type,
|
|
504
504
|
zone,
|
|
505
|
-
isSameZone
|
|
505
|
+
isSameZone,
|
|
506
|
+
noAnimation
|
|
506
507
|
}) => {
|
|
507
508
|
var _a;
|
|
508
509
|
centerSource.source = "recomend";
|
|
@@ -512,7 +513,7 @@ const BusinessRecomendPlaceMapInner = defineSetup("BusinessRecomendPlaceMapInner
|
|
|
512
513
|
...place
|
|
513
514
|
});
|
|
514
515
|
if ((type === "Restricted" || type === "Forbidden") && !isSameZone)
|
|
515
|
-
setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path, place2point(place));
|
|
516
|
+
setFitZoom((_a = zoneRef.value) == null ? void 0 : _a.path, place2point(place), noAnimation);
|
|
516
517
|
emit("changeRecomandPlace", coordinatifyValueOfOnChangeRecommendPlace({
|
|
517
518
|
place,
|
|
518
519
|
inputPlace,
|
|
@@ -13,7 +13,6 @@ const Gmap_css_ts_vanilla = "";
|
|
|
13
13
|
var gmap = "_7anfuo0";
|
|
14
14
|
const Gmap = defineSetup("Gmap", function(props, { slots, emit, attrs }) {
|
|
15
15
|
const setMap = props.mapRef;
|
|
16
|
-
const { onResize } = props;
|
|
17
16
|
const os = detectOSPlatform();
|
|
18
17
|
const options = computed(() => {
|
|
19
18
|
const {
|
|
@@ -49,7 +48,14 @@ const Gmap = defineSetup("Gmap", function(props, { slots, emit, attrs }) {
|
|
|
49
48
|
provideGmap(mapRef);
|
|
50
49
|
useGmapWheelZoomCenter({ mapRef, enableRef });
|
|
51
50
|
useGmapGestureZoomCenter({ mapRef, elementRef, enableRef });
|
|
52
|
-
useResizeObserver({
|
|
51
|
+
useResizeObserver({
|
|
52
|
+
elementRef,
|
|
53
|
+
shouldSkip: () => {
|
|
54
|
+
var _a;
|
|
55
|
+
return !((_a = mapRef.value) == null ? void 0 : _a.getProjection());
|
|
56
|
+
},
|
|
57
|
+
onChange: (e) => emit("resize", e)
|
|
58
|
+
});
|
|
53
59
|
watchPostEffect(() => {
|
|
54
60
|
const element = elementRef.value;
|
|
55
61
|
if (mapRef.value || !element)
|
|
@@ -5,7 +5,7 @@ import { Status, type GmapLoaderProps, type UseMapLoaderProps } from "../../hook
|
|
|
5
5
|
import { type MapSupplierPayolad } from "../../hooks/useMapSupplier";
|
|
6
6
|
import type { AmapMap } from "../../types/interface";
|
|
7
7
|
import { type AmapProps } from "../Amap";
|
|
8
|
-
export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId" | "renderLoadFailedTitle" | "renderLoadFailedDescription">;
|
|
8
|
+
export type MapProviderProps = UseMapLoaderProps & Pick<MapSupplierPayolad, "gmapId" | "gmapRasterId" | "googleDirectionsProxyUrl" | "googleSnapRoadProxyUrl" | "renderLoadFailedTitle" | "renderLoadFailedDescription">;
|
|
9
9
|
export declare const MapProvider: import("vue-demi").DefineComponent<import("vue-demi").ComponentObjectPropsOptions<MapProviderProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<MapProviderProps, Required<MapProviderProps>>, "success" | "fail" | "downloadOptimizeEnd", import("vue-demi").PublicProps, MapProviderProps, MapProviderProps, import("vue-demi").SlotsType<{
|
|
10
10
|
renderLoadFailedTitle?: ((status: Status) => string | undefined) | undefined;
|
|
11
11
|
renderLoadFailedDescription?: ((status: Status) => string | undefined) | undefined;
|