@heycar/heycars-map 0.9.1 → 0.9.4
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/dist/index.cjs +377 -327
- package/dist/index.js +377 -327
- package/dist/src/Demo/DemoBusinessTaxiEnd.d.ts +12 -2
- package/dist/src/api/contants.d.ts +4 -1
- package/dist/src/business-components/StartEndPoint/StartEndPoint.d.ts +1 -0
- package/dist/src/components/Amap/Amap.d.ts +1 -1
- package/dist/src/hooks/useMapGeometry.d.ts +3 -0
- package/dist/src/hooks/useMapLoader.d.ts +1 -1
- package/dist/src/hooks/useMapPlace.d.ts +3 -0
- package/dist/src/hooks/useMapRecomendPlace.d.ts +8 -50
- package/dist/src/hooks/useMapZoom.d.ts +2 -2
- package/dist/src/utils/helper.d.ts +4 -3
- package/dist/src/utils/transform.d.ts +20 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import Vue, { defineComponent, h, computed, inject, provide, watch, onMounted, onUnmounted, watchPostEffect, shallowRef, ref, watchEffect, reactive, toRefs, toRef } from "vue";
|
|
8
8
|
const style = "";
|
|
9
9
|
const name = "@heycar/heycars-map";
|
|
10
|
-
const version = "0.9.
|
|
10
|
+
const version = "0.9.4";
|
|
11
11
|
const type = "module";
|
|
12
12
|
const scripts = {
|
|
13
13
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -1098,16 +1098,16 @@ const isPlace = (place) => {
|
|
|
1098
1098
|
return place.lng !== void 0 && place.lat !== void 0;
|
|
1099
1099
|
};
|
|
1100
1100
|
const sleep = (milliSeconds) => new Promise((resolve) => setTimeout(resolve, milliSeconds));
|
|
1101
|
-
|
|
1101
|
+
function assertPoint(point) {
|
|
1102
1102
|
if (Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number")
|
|
1103
1103
|
return;
|
|
1104
1104
|
throw new Error(`Assertion Error: expect type [number, number], actual is ${point}`);
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1105
|
+
}
|
|
1106
|
+
function assertAngle(angle) {
|
|
1107
1107
|
if (typeof angle === "number" || typeof angle === "undefined")
|
|
1108
1108
|
return;
|
|
1109
1109
|
throw new Error(`Assertion Error: expect type number | undefined, actual is ${angle}`);
|
|
1110
|
-
}
|
|
1110
|
+
}
|
|
1111
1111
|
const isLatLngLiteral = (value) => {
|
|
1112
1112
|
return value != null && typeof value === "object" && Number.isFinite(value.lat) && Number.isFinite(value.lng);
|
|
1113
1113
|
};
|
|
@@ -1153,6 +1153,18 @@ const pausableSleep = (milliSeconds) => {
|
|
|
1153
1153
|
};
|
|
1154
1154
|
return { sleepPromise: sleepDefered, pause, restart };
|
|
1155
1155
|
};
|
|
1156
|
+
const MAX_ANIMATION_DISTANCE_VW = 300;
|
|
1157
|
+
const MIN_ANIMATION_DURATION = 300;
|
|
1158
|
+
const ANIMATION_DURATION_FOR_100VW = 200;
|
|
1159
|
+
const ANIMATION_DURATION_PER_ZOOM = 400;
|
|
1160
|
+
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
1161
|
+
const ZINDEX_BUBBLE_LAYER = 50;
|
|
1162
|
+
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
1163
|
+
const ZINDEX_PLACE_LAYER = 30;
|
|
1164
|
+
const ZINDEX_CAR_LAYER = 21;
|
|
1165
|
+
const ZINDEX_PASSENGER_LAYER = 20;
|
|
1166
|
+
const ZINDEX_LINE_LAYER = 12;
|
|
1167
|
+
const ZINDEX_GREEN_ZONE = 10;
|
|
1156
1168
|
const vec2lnglat = ([lng, lat]) => ({
|
|
1157
1169
|
lng: Number(lng),
|
|
1158
1170
|
lat: Number(lat)
|
|
@@ -1224,6 +1236,9 @@ const isGeoPositionEqual = (p1, p2) => {
|
|
|
1224
1236
|
return false;
|
|
1225
1237
|
return p1.coords.longitude === p2.coords.longitude && p1.coords.latitude === p2.coords.latitude;
|
|
1226
1238
|
};
|
|
1239
|
+
const isZoneEqual = (z1, z2) => {
|
|
1240
|
+
return z1.path.every((point, idx) => isPointEqual(point, z2 == null ? void 0 : z2.path[idx]));
|
|
1241
|
+
};
|
|
1227
1242
|
const amapPlaceName2DisplayName = (name2, options) => {
|
|
1228
1243
|
const { isChina, province, city, district, township } = options;
|
|
1229
1244
|
if (!name2)
|
|
@@ -1238,14 +1253,30 @@ const amapPlaceName2DisplayName = (name2, options) => {
|
|
|
1238
1253
|
}
|
|
1239
1254
|
return result;
|
|
1240
1255
|
};
|
|
1256
|
+
const distanceVw2animationDuration = (distance) => {
|
|
1257
|
+
return Math.max(MIN_ANIMATION_DURATION, ANIMATION_DURATION_FOR_100VW * distance / 100);
|
|
1258
|
+
};
|
|
1259
|
+
const deltaZoom2animationDuration = (deltaZoom) => {
|
|
1260
|
+
return Math.max(MIN_ANIMATION_DURATION * 4, Math.abs(deltaZoom) * ANIMATION_DURATION_PER_ZOOM);
|
|
1261
|
+
};
|
|
1262
|
+
const throwTypeError = (typeName, value, detail) => {
|
|
1263
|
+
if (detail)
|
|
1264
|
+
new Error(
|
|
1265
|
+
`MyTypeError: expect type: ${typeName}, but received: ${JSON.stringify(
|
|
1266
|
+
value
|
|
1267
|
+
)}
|
|
1268
|
+
Type Error Details: ${detail}`
|
|
1269
|
+
);
|
|
1270
|
+
throw new Error(`MyTypeError: expect type: ${typeName}, but received: ${JSON.stringify(value)}`);
|
|
1271
|
+
};
|
|
1241
1272
|
const toPlaceType = (maybePlace) => {
|
|
1242
1273
|
var _a;
|
|
1243
1274
|
const lng = Number(maybePlace.lng);
|
|
1244
1275
|
if (isNaN(lng))
|
|
1245
|
-
|
|
1276
|
+
throwTypeError("Place", maybePlace, "lng is not number");
|
|
1246
1277
|
const lat = Number(maybePlace.lat);
|
|
1247
1278
|
if (isNaN(lat))
|
|
1248
|
-
|
|
1279
|
+
throwTypeError("Place", maybePlace, "lat is not number");
|
|
1249
1280
|
return {
|
|
1250
1281
|
lng,
|
|
1251
1282
|
lat,
|
|
@@ -1253,6 +1284,37 @@ const toPlaceType = (maybePlace) => {
|
|
|
1253
1284
|
displayName: (_a = maybePlace.displayName) != null ? _a : maybePlace.name
|
|
1254
1285
|
};
|
|
1255
1286
|
};
|
|
1287
|
+
const toPointType = (maybePoint) => {
|
|
1288
|
+
const lng = Number(maybePoint == null ? void 0 : maybePoint[0]);
|
|
1289
|
+
const lat = Number(maybePoint == null ? void 0 : maybePoint[1]);
|
|
1290
|
+
if (isNaN(lat) || isNaN(lng))
|
|
1291
|
+
throwTypeError("Point", maybePoint);
|
|
1292
|
+
return [lng, lat];
|
|
1293
|
+
};
|
|
1294
|
+
const toZoneType = (maybeZone) => {
|
|
1295
|
+
try {
|
|
1296
|
+
if (!maybeZone)
|
|
1297
|
+
throwTypeError("Zone", maybeZone);
|
|
1298
|
+
const { name: name2 = "", path } = maybeZone;
|
|
1299
|
+
if (!Array.isArray(path))
|
|
1300
|
+
throwTypeError("Zone", maybeZone);
|
|
1301
|
+
return { name: name2, path: path.map(toPointType) };
|
|
1302
|
+
} catch (err) {
|
|
1303
|
+
return throwTypeError("Zone", maybeZone, err == null ? void 0 : err.message);
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
const toRecommendZonePlacesType = (maybeRecomendZonePlaces) => {
|
|
1307
|
+
try {
|
|
1308
|
+
const { available, zone, places } = maybeRecomendZonePlaces;
|
|
1309
|
+
return {
|
|
1310
|
+
available: !!available,
|
|
1311
|
+
zone: zone === void 0 ? zone : toZoneType(zone),
|
|
1312
|
+
places: places === void 0 ? places : places.map(toPlaceType)
|
|
1313
|
+
};
|
|
1314
|
+
} catch (err) {
|
|
1315
|
+
return throwTypeError("RecommendZonePlaces", maybeRecomendZonePlaces, err == null ? void 0 : err.message);
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1256
1318
|
const wxGetLocationSuccessResponse2GeolocationPosition = (res) => {
|
|
1257
1319
|
const { longitude, latitude, accuracy } = res;
|
|
1258
1320
|
const speed = Number(res.speed);
|
|
@@ -2243,15 +2305,6 @@ function detectWebGL() {
|
|
|
2243
2305
|
}
|
|
2244
2306
|
return "NOT_SUPPORTED";
|
|
2245
2307
|
}
|
|
2246
|
-
const MAX_ANIMATION_DISTANCE_VW = 100;
|
|
2247
|
-
const BEIJIN_POINT = [116.2317, 39.5427];
|
|
2248
|
-
const ZINDEX_BUBBLE_LAYER = 50;
|
|
2249
|
-
const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
2250
|
-
const ZINDEX_PLACE_LAYER = 30;
|
|
2251
|
-
const ZINDEX_CAR_LAYER = 21;
|
|
2252
|
-
const ZINDEX_PASSENGER_LAYER = 20;
|
|
2253
|
-
const ZINDEX_LINE_LAYER = 12;
|
|
2254
|
-
const ZINDEX_GREEN_ZONE = 10;
|
|
2255
2308
|
const useAmapLngLatToVw = (props) => {
|
|
2256
2309
|
const apiMapLngLatToVw = (point) => {
|
|
2257
2310
|
const amap2 = props.mapRef.value;
|
|
@@ -2387,8 +2440,13 @@ const Amap = defineSetup(function Amap2(props, { slots, emit }) {
|
|
|
2387
2440
|
const map = mapRef.value;
|
|
2388
2441
|
if (!center || !map)
|
|
2389
2442
|
return;
|
|
2390
|
-
|
|
2391
|
-
|
|
2443
|
+
if (!prevCenter)
|
|
2444
|
+
return map.setCenter(center, true);
|
|
2445
|
+
const distanceVw = apiMapDistanceVwOfPoints(center, prevCenter);
|
|
2446
|
+
if (distanceVw > MAX_ANIMATION_DISTANCE_VW)
|
|
2447
|
+
return map.setCenter(center, true);
|
|
2448
|
+
const duration = distanceVw2animationDuration(distanceVw);
|
|
2449
|
+
map.setCenter(center, false, duration);
|
|
2392
2450
|
}
|
|
2393
2451
|
);
|
|
2394
2452
|
watch(
|
|
@@ -3332,7 +3390,9 @@ const InterruptableIntervalFitView = defineSetup(function InterruptableIntervalF
|
|
|
3332
3390
|
});
|
|
3333
3391
|
return () => null;
|
|
3334
3392
|
});
|
|
3393
|
+
const imgEndPointEn = "data:image/svg+xml;base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09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
|
|
3337
3397
|
const StartEndPoint_css_ts_vanilla = "";
|
|
3338
3398
|
var arrowRight = createRuntimeFn({ defaultClassName: "_4a4ovka", variantClassNames: { withArrow: { true: "_4a4ovkb", false: "_4a4ovkc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
@@ -3352,9 +3412,10 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props, {
|
|
|
3352
3412
|
withArrow = false,
|
|
3353
3413
|
title,
|
|
3354
3414
|
description,
|
|
3355
|
-
type: type2
|
|
3415
|
+
type: type2,
|
|
3416
|
+
language
|
|
3356
3417
|
} = props;
|
|
3357
|
-
const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
|
|
3418
|
+
const icon = type2 === "start" ? language === "zh" ? imgStartPoint : imgStartPointEn : language === "zh" ? imgEndPoint : imgEndPointEn;
|
|
3358
3419
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3359
3420
|
if (!description && !title)
|
|
3360
3421
|
return `<img class="AStartEndPoint ${pointIcon({
|
|
@@ -3419,9 +3480,10 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props, {
|
|
|
3419
3480
|
withArrow = false,
|
|
3420
3481
|
title,
|
|
3421
3482
|
description,
|
|
3422
|
-
type: type2
|
|
3483
|
+
type: type2,
|
|
3484
|
+
language = "zh"
|
|
3423
3485
|
} = props;
|
|
3424
|
-
const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
|
|
3486
|
+
const icon = type2 === "start" ? language === "zh" ? imgStartPoint : imgStartPointEn : language === "zh" ? imgEndPoint : imgEndPointEn;
|
|
3425
3487
|
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3426
3488
|
if (!description && !title)
|
|
3427
3489
|
return createDom("img", {
|
|
@@ -3503,6 +3565,9 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props,
|
|
|
3503
3565
|
mapRef,
|
|
3504
3566
|
renderDescription
|
|
3505
3567
|
} = props;
|
|
3568
|
+
const {
|
|
3569
|
+
language
|
|
3570
|
+
} = useMapSupplier();
|
|
3506
3571
|
const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
|
|
3507
3572
|
const deferedSetFitView = pipeDefer(registerOverlay.setFitView);
|
|
3508
3573
|
return () => {
|
|
@@ -3531,7 +3596,8 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props,
|
|
|
3531
3596
|
"position": from,
|
|
3532
3597
|
"title": fromPlace.displayName,
|
|
3533
3598
|
"description": fromDescription,
|
|
3534
|
-
"withArrow": true
|
|
3599
|
+
"withArrow": true,
|
|
3600
|
+
"language": language
|
|
3535
3601
|
},
|
|
3536
3602
|
"on": {
|
|
3537
3603
|
"click": () => emit("clickStartPoint", fromPlace)
|
|
@@ -3558,7 +3624,8 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props,
|
|
|
3558
3624
|
distance,
|
|
3559
3625
|
duration
|
|
3560
3626
|
}),
|
|
3561
|
-
"withArrow": true
|
|
3627
|
+
"withArrow": true,
|
|
3628
|
+
"language": language
|
|
3562
3629
|
},
|
|
3563
3630
|
"on": {
|
|
3564
3631
|
"click": () => emit("clickEndPoint", toPlace)
|
|
@@ -3987,8 +4054,6 @@ const useGeoLocation = (props) => {
|
|
|
3987
4054
|
geoReady: readyRef
|
|
3988
4055
|
};
|
|
3989
4056
|
};
|
|
3990
|
-
const MAX_AMAP_PAN_TO_ANIMATE_DURATION = 500;
|
|
3991
|
-
const MIN_AMAP_PAN_TO_ANIMATE_DURATION = 100;
|
|
3992
4057
|
const useHeycarAmap = () => {
|
|
3993
4058
|
const amapRef = shallowRef();
|
|
3994
4059
|
const amapElementRef = shallowRef();
|
|
@@ -4005,10 +4070,7 @@ const useHeycarAmap = () => {
|
|
|
4005
4070
|
const distanceVw = apiMapDistanceVwOfPoints(value, [lng, lat]);
|
|
4006
4071
|
const shouldAnimate = distanceVw < MAX_ANIMATION_DISTANCE_VW;
|
|
4007
4072
|
if (shouldAnimate) {
|
|
4008
|
-
const duration =
|
|
4009
|
-
MIN_AMAP_PAN_TO_ANIMATE_DURATION,
|
|
4010
|
-
Math.floor(MAX_AMAP_PAN_TO_ANIMATE_DURATION * distanceVw / MAX_ANIMATION_DISTANCE_VW)
|
|
4011
|
-
);
|
|
4073
|
+
const duration = distanceVw2animationDuration(distanceVw);
|
|
4012
4074
|
amap2.panTo(value, duration);
|
|
4013
4075
|
await sleep(duration);
|
|
4014
4076
|
} else {
|
|
@@ -4134,6 +4196,49 @@ const useMapDrag = (props) => {
|
|
|
4134
4196
|
const { supplier } = useMapSupplier();
|
|
4135
4197
|
return supplier === "gmap" ? useGmapDrag(props) : useAmapDrag(props);
|
|
4136
4198
|
};
|
|
4199
|
+
const useAmapGeometry = () => {
|
|
4200
|
+
const payload = useMapSupplier();
|
|
4201
|
+
const apiMapDistance = (from, to) => {
|
|
4202
|
+
if (payload.status !== Status.SUCCESS)
|
|
4203
|
+
return void 0;
|
|
4204
|
+
return AMap.GeometryUtil.distance(from, to);
|
|
4205
|
+
};
|
|
4206
|
+
const apiMapDistanceToLine = (from, line) => {
|
|
4207
|
+
if (payload.status !== Status.SUCCESS)
|
|
4208
|
+
return void 0;
|
|
4209
|
+
return AMap.GeometryUtil.distanceToLine(from, line);
|
|
4210
|
+
};
|
|
4211
|
+
const apiMapIsPointInRing = (point, path) => {
|
|
4212
|
+
if (payload.status !== Status.SUCCESS)
|
|
4213
|
+
return void 0;
|
|
4214
|
+
return AMap.GeometryUtil.isPointInRing(point, path);
|
|
4215
|
+
};
|
|
4216
|
+
return { apiMapDistance, apiMapDistanceToLine, apiMapIsPointInRing };
|
|
4217
|
+
};
|
|
4218
|
+
const useGmapGeometry = () => {
|
|
4219
|
+
const payload = useMapSupplier();
|
|
4220
|
+
const apiMapDistance = (from, to) => {
|
|
4221
|
+
if (payload.status !== Status.SUCCESS)
|
|
4222
|
+
return void 0;
|
|
4223
|
+
return google.maps.geometry.spherical.computeDistanceBetween(vec2lnglat(from), vec2lnglat(to));
|
|
4224
|
+
};
|
|
4225
|
+
const apiMapDistanceToLine = (from, line) => {
|
|
4226
|
+
if (payload.status !== Status.SUCCESS)
|
|
4227
|
+
return void 0;
|
|
4228
|
+
return 0;
|
|
4229
|
+
};
|
|
4230
|
+
const apiMapIsPointInRing = (point, path) => {
|
|
4231
|
+
if (payload.status !== Status.SUCCESS)
|
|
4232
|
+
return void 0;
|
|
4233
|
+
const polygon = new google.maps.Polygon({ paths: path.map(vec2lnglat) });
|
|
4234
|
+
return google.maps.geometry.poly.containsLocation(vec2lnglat(point), polygon);
|
|
4235
|
+
};
|
|
4236
|
+
return { apiMapDistance, apiMapDistanceToLine, apiMapIsPointInRing };
|
|
4237
|
+
};
|
|
4238
|
+
const useMapGeometry = () => {
|
|
4239
|
+
const { supplier } = useMapSupplier();
|
|
4240
|
+
return supplier === "gmap" ? useGmapGeometry() : useAmapGeometry();
|
|
4241
|
+
};
|
|
4137
4242
|
const chinaBounds = [
|
|
4138
4243
|
[
|
|
4139
4244
|
108.03446,
|
|
@@ -5653,12 +5758,9 @@ const useAmapPlace = (props) => {
|
|
|
5653
5758
|
place.name = value.name;
|
|
5654
5759
|
place.displayName = value.displayName;
|
|
5655
5760
|
};
|
|
5656
|
-
|
|
5657
|
-
() =>
|
|
5658
|
-
async () => {
|
|
5659
|
-
await readyPromise;
|
|
5761
|
+
const getPlaceByRegeo = ([lng, lat]) => {
|
|
5762
|
+
return new Promise((resolve, reject) => {
|
|
5660
5763
|
const geocoder = new AMap.Geocoder({ lang: language === "en" ? "en" : "zh_cn" });
|
|
5661
|
-
const [lng, lat] = pointRef.value;
|
|
5662
5764
|
const isChina = inChina([lng, lat]);
|
|
5663
5765
|
geocoder.getAddress(new AMap.LngLat(lng, lat), (status, result) => {
|
|
5664
5766
|
switch (status) {
|
|
@@ -5666,30 +5768,30 @@ const useAmapPlace = (props) => {
|
|
|
5666
5768
|
const { formattedAddress, addressComponent } = result.regeocode;
|
|
5667
5769
|
const name2 = formattedAddress ? formattedAddress : emptyPlaceName;
|
|
5668
5770
|
const displayName = amapPlaceName2DisplayName(name2, { isChina, ...addressComponent });
|
|
5669
|
-
|
|
5670
|
-
place.displayName = displayName;
|
|
5671
|
-
place.lng = lng;
|
|
5672
|
-
place.lat = lat;
|
|
5673
|
-
onChange == null ? void 0 : onChange({ lng, lat, name: name2, displayName });
|
|
5771
|
+
resolve({ lng, lat, name: name2, displayName });
|
|
5674
5772
|
return;
|
|
5675
5773
|
}
|
|
5676
5774
|
case "no_data": {
|
|
5677
5775
|
const name2 = emptyPlaceName;
|
|
5678
5776
|
const displayName = emptyPlaceName;
|
|
5679
|
-
|
|
5680
|
-
place.displayName = displayName;
|
|
5681
|
-
place.lng = lng;
|
|
5682
|
-
place.lat = lat;
|
|
5683
|
-
onChange == null ? void 0 : onChange({ lng, lat, name: name2, displayName });
|
|
5777
|
+
resolve({ lng, lat, name: name2, displayName });
|
|
5684
5778
|
return;
|
|
5685
5779
|
}
|
|
5686
5780
|
case "error":
|
|
5687
|
-
|
|
5781
|
+
reject(result);
|
|
5688
5782
|
}
|
|
5689
5783
|
});
|
|
5784
|
+
});
|
|
5785
|
+
};
|
|
5786
|
+
watch(
|
|
5787
|
+
() => [placeKey.value],
|
|
5788
|
+
async () => {
|
|
5789
|
+
await readyPromise;
|
|
5790
|
+
const resultPlace = await getPlaceByRegeo(pointRef.value);
|
|
5791
|
+
onChange == null ? void 0 : onChange(resultPlace);
|
|
5690
5792
|
}
|
|
5691
5793
|
);
|
|
5692
|
-
return { place, updatePlace, setPlace };
|
|
5794
|
+
return { place, updatePlace, setPlace, getPlaceByRegeo };
|
|
5693
5795
|
};
|
|
5694
5796
|
const useGmapPlace = (props) => {
|
|
5695
5797
|
const { onChange, emptyPlaceName } = props;
|
|
@@ -5713,214 +5815,182 @@ const useGmapPlace = (props) => {
|
|
|
5713
5815
|
place.name = value.name;
|
|
5714
5816
|
place.displayName = value.displayName;
|
|
5715
5817
|
};
|
|
5818
|
+
const getPlaceByRegeo = ([lng, lat]) => {
|
|
5819
|
+
return new Promise((resolve, reject) => {
|
|
5820
|
+
const geocoder = new google.maps.Geocoder();
|
|
5821
|
+
geocoder.geocode({ language, location: { lng, lat } }).then(({ results }) => {
|
|
5822
|
+
const name2 = results[0].formatted_address ? results[0].formatted_address : emptyPlaceName;
|
|
5823
|
+
const displayName = name2;
|
|
5824
|
+
resolve({ lng, lat, name: name2, displayName });
|
|
5825
|
+
}).catch(reject);
|
|
5826
|
+
});
|
|
5827
|
+
};
|
|
5716
5828
|
watch(
|
|
5717
5829
|
() => placeKey.value,
|
|
5718
5830
|
async () => {
|
|
5719
5831
|
await readyPromise;
|
|
5720
|
-
const
|
|
5721
|
-
|
|
5722
|
-
const { results } = await geocoder.geocode({ language, location: { lng, lat } });
|
|
5723
|
-
const name2 = results[0].formatted_address ? results[0].formatted_address : emptyPlaceName;
|
|
5724
|
-
const displayName = name2;
|
|
5725
|
-
place.lng = lng;
|
|
5726
|
-
place.lat = lat;
|
|
5727
|
-
place.name = name2;
|
|
5728
|
-
place.displayName = displayName;
|
|
5729
|
-
onChange == null ? void 0 : onChange({ lng, lat, name: name2, displayName });
|
|
5832
|
+
const resultPlace = await getPlaceByRegeo(pointRef.value);
|
|
5833
|
+
onChange == null ? void 0 : onChange(resultPlace);
|
|
5730
5834
|
}
|
|
5731
5835
|
);
|
|
5732
|
-
return { place, updatePlace, setPlace };
|
|
5836
|
+
return { place, updatePlace, setPlace, getPlaceByRegeo };
|
|
5733
5837
|
};
|
|
5734
5838
|
const useMapPlace = (props) => {
|
|
5735
5839
|
const { supplier } = useMapSupplier();
|
|
5736
5840
|
return supplier === "gmap" ? useGmapPlace(props) : useAmapPlace(props);
|
|
5737
5841
|
};
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
let shortestPlace = place;
|
|
5741
|
-
for (const candidate of candidates) {
|
|
5742
|
-
const distance = AMap.GeometryUtil.distance(place2point(place), place2point(candidate));
|
|
5743
|
-
if (distance >= shortestDistance)
|
|
5744
|
-
continue;
|
|
5745
|
-
shortestPlace = candidate;
|
|
5746
|
-
shortestDistance = distance;
|
|
5747
|
-
}
|
|
5748
|
-
return { shortestPlace, shortestDistance };
|
|
5749
|
-
};
|
|
5750
|
-
const findGmapNearestPlace = (place, candidates) => {
|
|
5842
|
+
function findNearestPlace(place, candidates, distanceFn) {
|
|
5843
|
+
var _a;
|
|
5751
5844
|
let shortestDistance = Infinity;
|
|
5752
5845
|
let shortestPlace = place;
|
|
5753
5846
|
for (const candidate of candidates) {
|
|
5754
|
-
const distance =
|
|
5847
|
+
const distance = (_a = distanceFn(place2point(place), place2point(candidate))) != null ? _a : Infinity;
|
|
5755
5848
|
if (distance >= shortestDistance)
|
|
5756
5849
|
continue;
|
|
5757
5850
|
shortestPlace = candidate;
|
|
5758
5851
|
shortestDistance = distance;
|
|
5759
5852
|
}
|
|
5760
5853
|
return { shortestPlace, shortestDistance };
|
|
5761
|
-
}
|
|
5762
|
-
const
|
|
5763
|
-
const {
|
|
5854
|
+
}
|
|
5855
|
+
const useMapRecomendPlace = (props) => {
|
|
5856
|
+
const {
|
|
5857
|
+
defaultPoint,
|
|
5858
|
+
getRecomendPlace,
|
|
5859
|
+
getLimit,
|
|
5860
|
+
context: context2,
|
|
5861
|
+
emptyPlaceName,
|
|
5862
|
+
onChange,
|
|
5863
|
+
onChangePlace
|
|
5864
|
+
} = props;
|
|
5764
5865
|
const availableRef = ref(true);
|
|
5765
5866
|
const placeCandidatesRef = ref([]);
|
|
5766
5867
|
const zoneRef = ref();
|
|
5767
|
-
const {
|
|
5768
|
-
const {
|
|
5769
|
-
const { place, updatePlace, setPlace } = useAmapPlace({
|
|
5868
|
+
const { apiMapIsPointInRing, apiMapDistance } = useMapGeometry();
|
|
5869
|
+
const { getPlaceByRegeo } = useAmapPlace({
|
|
5770
5870
|
emptyPlaceName,
|
|
5771
|
-
pointRef
|
|
5772
|
-
|
|
5871
|
+
pointRef: ref([...defaultPoint])
|
|
5872
|
+
});
|
|
5873
|
+
const recomendPlace = reactive({
|
|
5874
|
+
lng: defaultPoint[0],
|
|
5875
|
+
lat: defaultPoint[1],
|
|
5876
|
+
name: "",
|
|
5877
|
+
displayName: ""
|
|
5773
5878
|
});
|
|
5774
|
-
const recomendPlace = reactive({ ...place });
|
|
5775
5879
|
const isElectedRef = computed(() => {
|
|
5776
|
-
const
|
|
5880
|
+
const recomendPoint = place2point(recomendPlace);
|
|
5777
5881
|
return placeCandidatesRef.value.some(
|
|
5778
|
-
(candidate) => isPointEqual(place2point(candidate),
|
|
5882
|
+
(candidate) => isPointEqual(place2point(candidate), recomendPoint)
|
|
5779
5883
|
);
|
|
5780
5884
|
});
|
|
5781
|
-
const
|
|
5885
|
+
const findAttachedPlace = async (place) => {
|
|
5782
5886
|
var _a;
|
|
5887
|
+
const inputRecommendZonePlaces = (_a = await getRecomendPlace({ ...place }, context2)) != null ? _a : {};
|
|
5783
5888
|
const {
|
|
5784
|
-
places:
|
|
5889
|
+
places: placeCandidates,
|
|
5785
5890
|
zone,
|
|
5786
|
-
available
|
|
5787
|
-
} = (
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5891
|
+
available = false
|
|
5892
|
+
} = toRecommendZonePlacesType(inputRecommendZonePlaces);
|
|
5893
|
+
if (!available || !placeCandidates) {
|
|
5894
|
+
return { place: { ...place }, zone, candidates: [], available };
|
|
5895
|
+
}
|
|
5896
|
+
const { shortestPlace, shortestDistance } = findNearestPlace(
|
|
5897
|
+
place,
|
|
5898
|
+
placeCandidates,
|
|
5899
|
+
apiMapDistance
|
|
5900
|
+
);
|
|
5901
|
+
const limit = getLimit(context2);
|
|
5902
|
+
const resultPlace = zone || shortestDistance <= limit ? shortestPlace : place;
|
|
5903
|
+
return { place: { ...resultPlace }, zone, candidates: placeCandidates, available };
|
|
5904
|
+
};
|
|
5905
|
+
const getRecommendPlaceZoneState = async (point, prevState) => {
|
|
5906
|
+
const zone = zoneRef.value;
|
|
5907
|
+
if (!zone || !apiMapIsPointInRing(point, zone.path)) {
|
|
5908
|
+
const reGeoPlace = await getPlaceByRegeo(point);
|
|
5909
|
+
const {
|
|
5910
|
+
place: resultPlace2,
|
|
5911
|
+
candidates,
|
|
5912
|
+
available,
|
|
5913
|
+
zone: zone2
|
|
5914
|
+
} = await findAttachedPlace(reGeoPlace);
|
|
5915
|
+
return { place: { ...resultPlace2 }, zone: zone2, available, candidates };
|
|
5916
|
+
}
|
|
5917
|
+
const [lng, lat] = point;
|
|
5918
|
+
const { shortestPlace: resultPlace } = findNearestPlace(
|
|
5919
|
+
{ lng, lat, name: "", displayName: "" },
|
|
5920
|
+
placeCandidatesRef.value,
|
|
5921
|
+
apiMapDistance
|
|
5922
|
+
);
|
|
5792
5923
|
return {
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5924
|
+
place: { ...resultPlace },
|
|
5925
|
+
zone,
|
|
5926
|
+
available: prevState.available,
|
|
5927
|
+
candidates: prevState.candidates
|
|
5796
5928
|
};
|
|
5797
5929
|
};
|
|
5798
|
-
const
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
available
|
|
5819
|
-
} = (_a = await getRecomendPlace({ ...place }, context2)) != null ? _a : {};
|
|
5820
|
-
const placeCandidates = inputPlaceCandidates == null ? void 0 : inputPlaceCandidates.map(toPlaceType);
|
|
5821
|
-
if (!available || !placeCandidates) {
|
|
5822
|
-
availableRef.value = !!available;
|
|
5823
|
-
zoneRef.value = zone;
|
|
5824
|
-
placeCandidatesRef.value = [];
|
|
5825
|
-
Object.assign(recomendPlace, { ...place });
|
|
5826
|
-
onChange == null ? void 0 : onChange({ place: { ...place }, inputPlace: { ...place }, isInZone: !!zone });
|
|
5827
|
-
return;
|
|
5828
|
-
}
|
|
5829
|
-
const { shortestPlace, shortestDistance } = findAmapNearestPlace(place, placeCandidates);
|
|
5830
|
-
const limit = getLimit(context2);
|
|
5831
|
-
const resultPlace = zone || shortestDistance <= limit ? shortestPlace : place;
|
|
5832
|
-
availableRef.value = !!available;
|
|
5833
|
-
zoneRef.value = zone;
|
|
5834
|
-
placeCandidatesRef.value = placeCandidates;
|
|
5835
|
-
Object.assign(recomendPlace, { ...resultPlace });
|
|
5836
|
-
onChange == null ? void 0 : onChange({ place: { ...resultPlace }, inputPlace: { ...place }, isInZone: !!zone });
|
|
5837
|
-
}
|
|
5838
|
-
);
|
|
5839
|
-
return {
|
|
5840
|
-
zoneRef,
|
|
5841
|
-
recomendPlace,
|
|
5842
|
-
placeCandidates: placeCandidatesRef,
|
|
5843
|
-
availableRef,
|
|
5844
|
-
isElectedRef,
|
|
5845
|
-
updateRecommendPlace,
|
|
5846
|
-
updatePlaceCandidates,
|
|
5847
|
-
updatePlace,
|
|
5848
|
-
setPlaceCandidatesAndZone
|
|
5930
|
+
const updatePlace = async (point) => {
|
|
5931
|
+
const {
|
|
5932
|
+
place: resultPlace,
|
|
5933
|
+
candidates,
|
|
5934
|
+
zone,
|
|
5935
|
+
available
|
|
5936
|
+
} = await getRecommendPlaceZoneState(point, {
|
|
5937
|
+
place: recomendPlace,
|
|
5938
|
+
available: availableRef.value,
|
|
5939
|
+
candidates: placeCandidatesRef.value,
|
|
5940
|
+
zone: zoneRef.value
|
|
5941
|
+
});
|
|
5942
|
+
const isSameZone = !!zone && isZoneEqual(zone, zoneRef.value);
|
|
5943
|
+
availableRef.value = available;
|
|
5944
|
+
zoneRef.value = zone;
|
|
5945
|
+
placeCandidatesRef.value = candidates;
|
|
5946
|
+
Object.assign(recomendPlace, { ...resultPlace });
|
|
5947
|
+
onChangePlace == null ? void 0 : onChangePlace({ ...resultPlace });
|
|
5948
|
+
const inputPlace = { name: "", displayName: "", lng: point[0], lat: point[1] };
|
|
5949
|
+
onChange == null ? void 0 : onChange({ place: { ...resultPlace }, inputPlace, isInZone: !!zone, isSameZone });
|
|
5849
5950
|
};
|
|
5850
|
-
|
|
5851
|
-
const useGmapRecomendPlace = (props) => {
|
|
5852
|
-
const { pointRef, getRecomendPlace, getLimit, context: context2, emptyPlaceName, onChange, onChangePlace } = props;
|
|
5853
|
-
const availableRef = ref(true);
|
|
5854
|
-
const placeCandidatesRef = ref([]);
|
|
5855
|
-
const zoneRef = ref();
|
|
5856
|
-
const { idx: recomendPlaceKey, update: updateRecommendPlaceKey } = useUpdate();
|
|
5857
|
-
const { readyPromise } = useMapSupplier();
|
|
5858
|
-
const { place, updatePlace, setPlace } = useGmapPlace({
|
|
5859
|
-
emptyPlaceName,
|
|
5860
|
-
pointRef,
|
|
5861
|
-
onChange: onChangePlace
|
|
5862
|
-
});
|
|
5863
|
-
const recomendPlace = reactive({ ...place });
|
|
5864
|
-
const isElectedRef = computed(() => {
|
|
5865
|
-
const point = pointRef.value;
|
|
5866
|
-
return placeCandidatesRef.value.some(
|
|
5867
|
-
(candidate) => isPointEqual(place2point(candidate), point)
|
|
5868
|
-
);
|
|
5869
|
-
});
|
|
5870
|
-
const updatePlaceCandidates = async (place2) => {
|
|
5951
|
+
const updatePlaceCandidates = async (place) => {
|
|
5871
5952
|
var _a;
|
|
5953
|
+
const inputRecommendZonePlaces = (_a = await getRecomendPlace({ ...place }, context2)) != null ? _a : {};
|
|
5872
5954
|
const {
|
|
5873
|
-
places:
|
|
5955
|
+
places: placeCandidates,
|
|
5874
5956
|
zone,
|
|
5875
|
-
available
|
|
5876
|
-
} = (
|
|
5877
|
-
const
|
|
5957
|
+
available = false
|
|
5958
|
+
} = toRecommendZonePlacesType(inputRecommendZonePlaces);
|
|
5959
|
+
const isSameZone = !!zone && isZoneEqual(zone, zoneRef.value);
|
|
5878
5960
|
availableRef.value = !!available;
|
|
5879
5961
|
zoneRef.value = zone;
|
|
5880
5962
|
placeCandidatesRef.value = placeCandidates != null ? placeCandidates : [];
|
|
5881
5963
|
return {
|
|
5882
|
-
inputPlace: { ...
|
|
5964
|
+
inputPlace: { ...place },
|
|
5883
5965
|
isInZone: !!zone,
|
|
5884
|
-
place
|
|
5966
|
+
place,
|
|
5967
|
+
isSameZone
|
|
5885
5968
|
};
|
|
5886
5969
|
};
|
|
5887
|
-
const updateRecommendPlace = (
|
|
5888
|
-
|
|
5889
|
-
|
|
5970
|
+
const updateRecommendPlace = async (place) => {
|
|
5971
|
+
const { place: resultPlace, candidates, available, zone } = await findAttachedPlace(place);
|
|
5972
|
+
const isSameZone = !!zone && isZoneEqual(zone, zoneRef.value);
|
|
5973
|
+
availableRef.value = available;
|
|
5974
|
+
zoneRef.value = zone;
|
|
5975
|
+
placeCandidatesRef.value = candidates;
|
|
5976
|
+
Object.assign(recomendPlace, { ...resultPlace });
|
|
5977
|
+
onChangePlace == null ? void 0 : onChangePlace({ ...resultPlace });
|
|
5978
|
+
onChange == null ? void 0 : onChange({
|
|
5979
|
+
place: { ...resultPlace },
|
|
5980
|
+
inputPlace: { ...place },
|
|
5981
|
+
isInZone: !!zone,
|
|
5982
|
+
isSameZone
|
|
5983
|
+
});
|
|
5890
5984
|
};
|
|
5891
|
-
const setPlaceCandidatesAndZone = ({
|
|
5892
|
-
|
|
5985
|
+
const setPlaceCandidatesAndZone = ({
|
|
5986
|
+
zone,
|
|
5987
|
+
places: inputPlaceCandidates
|
|
5988
|
+
}) => {
|
|
5989
|
+
const placeCandidates = inputPlaceCandidates == null ? void 0 : inputPlaceCandidates.map(toPlaceType);
|
|
5990
|
+
availableRef.value = true;
|
|
5893
5991
|
zoneRef.value = zone ? zone : void 0;
|
|
5992
|
+
placeCandidatesRef.value = placeCandidates != null ? placeCandidates : [];
|
|
5894
5993
|
};
|
|
5895
|
-
watch(
|
|
5896
|
-
() => recomendPlaceKey.value,
|
|
5897
|
-
async () => {
|
|
5898
|
-
var _a;
|
|
5899
|
-
await readyPromise;
|
|
5900
|
-
const {
|
|
5901
|
-
places: inputPlaceCandidates,
|
|
5902
|
-
zone,
|
|
5903
|
-
available
|
|
5904
|
-
} = (_a = await getRecomendPlace({ ...place }, context2)) != null ? _a : {};
|
|
5905
|
-
const placeCandidates = inputPlaceCandidates == null ? void 0 : inputPlaceCandidates.map(toPlaceType);
|
|
5906
|
-
if (!available || !placeCandidates) {
|
|
5907
|
-
availableRef.value = !!available;
|
|
5908
|
-
zoneRef.value = zone;
|
|
5909
|
-
placeCandidatesRef.value = [];
|
|
5910
|
-
Object.assign(recomendPlace, { ...place });
|
|
5911
|
-
onChange == null ? void 0 : onChange({ place: { ...place }, inputPlace: { ...place }, isInZone: !!zone });
|
|
5912
|
-
return;
|
|
5913
|
-
}
|
|
5914
|
-
const { shortestPlace, shortestDistance } = findGmapNearestPlace(place, placeCandidates);
|
|
5915
|
-
const limit = getLimit(context2);
|
|
5916
|
-
const resultPlace = shortestDistance > limit ? place : shortestPlace;
|
|
5917
|
-
availableRef.value = !!available;
|
|
5918
|
-
zoneRef.value = zone;
|
|
5919
|
-
placeCandidatesRef.value = placeCandidates;
|
|
5920
|
-
Object.assign(recomendPlace, { ...resultPlace });
|
|
5921
|
-
onChange == null ? void 0 : onChange({ place: { ...resultPlace }, inputPlace: { ...place }, isInZone: !!zone });
|
|
5922
|
-
}
|
|
5923
|
-
);
|
|
5924
5994
|
return {
|
|
5925
5995
|
zoneRef,
|
|
5926
5996
|
recomendPlace,
|
|
@@ -5933,20 +6003,19 @@ const useGmapRecomendPlace = (props) => {
|
|
|
5933
6003
|
setPlaceCandidatesAndZone
|
|
5934
6004
|
};
|
|
5935
6005
|
};
|
|
5936
|
-
const useMapRecomendPlace = (props) => {
|
|
5937
|
-
const { supplier } = useMapSupplier();
|
|
5938
|
-
return supplier === "gmap" ? useGmapRecomendPlace(props) : useAmapRecomendPlace(props);
|
|
5939
|
-
};
|
|
5940
6006
|
const GOOGLE_MAP_ZOOM_CHANGE_DEBOUNCE_TIMEOUT = 50;
|
|
5941
6007
|
const DEFAULT_ZOOM$1 = 13;
|
|
5942
6008
|
const useAmapZoom = (props) => {
|
|
5943
6009
|
var _a, _b, _c;
|
|
5944
6010
|
const { onChange, mapRef, defaultValue } = props;
|
|
5945
6011
|
const zoomRef = ref((_c = (_b = (_a = mapRef.value) == null ? void 0 : _a.getZoom()) != null ? _b : defaultValue) != null ? _c : DEFAULT_ZOOM$1);
|
|
5946
|
-
const setZoom = (v) => {
|
|
5947
|
-
var _a2;
|
|
6012
|
+
const setZoom = (v, immediate = false) => {
|
|
6013
|
+
var _a2, _b2;
|
|
6014
|
+
const duration = deltaZoom2animationDuration(v - zoomRef.value);
|
|
5948
6015
|
zoomRef.value = v;
|
|
5949
|
-
|
|
6016
|
+
if (immediate)
|
|
6017
|
+
return (_a2 = mapRef.value) == null ? void 0 : _a2.setZoom(v, true);
|
|
6018
|
+
(_b2 = mapRef.value) == null ? void 0 : _b2.setZoom(v, false, duration);
|
|
5950
6019
|
};
|
|
5951
6020
|
const handleZoomEnd = (_, { target }) => {
|
|
5952
6021
|
const zoom = target.getZoom();
|
|
@@ -6678,7 +6747,6 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6678
6747
|
name: geoLoadingTitle,
|
|
6679
6748
|
displayName: geoLoadingTitle
|
|
6680
6749
|
});
|
|
6681
|
-
const centerPoint = computed(() => [centerPlace.lng, centerPlace.lat]);
|
|
6682
6750
|
const centerSource = {
|
|
6683
6751
|
source: "geo"
|
|
6684
6752
|
};
|
|
@@ -6689,25 +6757,20 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6689
6757
|
const setCenterPlaceByUserSpecified = async (input) => {
|
|
6690
6758
|
centerSource.source = "api";
|
|
6691
6759
|
const place = toPlaceType(input);
|
|
6692
|
-
centerPlace
|
|
6693
|
-
centerPlace.lat = place.lat;
|
|
6694
|
-
centerPlace.name = place.name;
|
|
6695
|
-
centerPlace.displayName = place.displayName;
|
|
6696
|
-
emit("changePlace", {
|
|
6697
|
-
...place
|
|
6698
|
-
});
|
|
6760
|
+
Object.assign(centerPlace, place);
|
|
6699
6761
|
updateRecommendPlace(place);
|
|
6700
6762
|
};
|
|
6701
|
-
const setCenterPlaceByUserSpecifiedInZone = ({
|
|
6702
|
-
place,
|
|
6703
|
-
recommends
|
|
6763
|
+
const setCenterPlaceByUserSpecifiedInZone = async ({
|
|
6764
|
+
place: inputPlace,
|
|
6765
|
+
recommends: inputRecommends
|
|
6704
6766
|
}) => {
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6767
|
+
const place = toPlaceType(inputPlace);
|
|
6768
|
+
const recommends = toRecommendZonePlacesType(inputRecommends);
|
|
6769
|
+
const isSameZone = recommends.zone && isZoneEqual(recommends.zone, zoneRef.value);
|
|
6770
|
+
if (!isSameZone)
|
|
6771
|
+
setZoom(ZONE_ZOOM);
|
|
6772
|
+
Object.assign(centerPlace, place);
|
|
6709
6773
|
setPlaceCandidatesAndZone(recommends);
|
|
6710
|
-
setZoom(ZONE_ZOOM);
|
|
6711
6774
|
emit("changePlace", {
|
|
6712
6775
|
...place
|
|
6713
6776
|
});
|
|
@@ -6715,12 +6778,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6715
6778
|
const panToCenterByPlace = async (place) => {
|
|
6716
6779
|
centerSource.source = "api";
|
|
6717
6780
|
await panTo(place2point(place));
|
|
6718
|
-
centerPlace
|
|
6719
|
-
centerPlace.lat = place.lat;
|
|
6720
|
-
centerPlace.name = place.name;
|
|
6721
|
-
centerPlace.displayName = place.displayName;
|
|
6722
|
-
if (zoneRef.value)
|
|
6723
|
-
setZoom(ZONE_ZOOM);
|
|
6781
|
+
Object.assign(centerPlace, place);
|
|
6724
6782
|
emit("changePlace", {
|
|
6725
6783
|
...place
|
|
6726
6784
|
});
|
|
@@ -6731,7 +6789,8 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6731
6789
|
inputPlace: {
|
|
6732
6790
|
...place
|
|
6733
6791
|
},
|
|
6734
|
-
isInZone: !!zoneRef.value
|
|
6792
|
+
isInZone: !!zoneRef.value,
|
|
6793
|
+
isSameZone: !!zoneRef.value
|
|
6735
6794
|
});
|
|
6736
6795
|
};
|
|
6737
6796
|
const defaultCenterPlacePromise = new Promise((resolve) => {
|
|
@@ -6749,18 +6808,21 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6749
6808
|
} = useGeoLocation({
|
|
6750
6809
|
geoDefaultPosition,
|
|
6751
6810
|
onLoad: async (value) => {
|
|
6811
|
+
const [lng, lat] = value.position;
|
|
6752
6812
|
await readyPromise;
|
|
6753
6813
|
centerSource.source = "geo";
|
|
6814
|
+
centerPlace.lng = lng;
|
|
6815
|
+
centerPlace.lat = lat;
|
|
6754
6816
|
updatePlace(value.position);
|
|
6755
6817
|
emit("loadGeoLocation", value);
|
|
6756
6818
|
},
|
|
6757
6819
|
onLoadDefault: async (value) => {
|
|
6758
6820
|
await readyPromise;
|
|
6759
|
-
const
|
|
6821
|
+
const inputPlace = await defaultCenterPlacePromise;
|
|
6760
6822
|
centerSource.source = "geo";
|
|
6761
6823
|
emit("loadDefaultGeoLocation", value);
|
|
6762
|
-
if (
|
|
6763
|
-
await setCenterPlaceByUserSpecified(
|
|
6824
|
+
if (inputPlace) {
|
|
6825
|
+
await setCenterPlaceByUserSpecified(inputPlace);
|
|
6764
6826
|
} else {
|
|
6765
6827
|
updatePlace(value.position);
|
|
6766
6828
|
}
|
|
@@ -6795,7 +6857,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6795
6857
|
availableRef,
|
|
6796
6858
|
isElectedRef
|
|
6797
6859
|
} = useMapRecomendPlace({
|
|
6798
|
-
|
|
6860
|
+
defaultPoint: place2point(centerPlace),
|
|
6799
6861
|
emptyPlaceName: DEFAULT_PLACE_NAME,
|
|
6800
6862
|
context: centerSource,
|
|
6801
6863
|
getRecomendPlace: pipedGetRecomendPlace,
|
|
@@ -6812,16 +6874,12 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6812
6874
|
throw new Error(`MyError: should not call getLimit on source: ${source}`);
|
|
6813
6875
|
}
|
|
6814
6876
|
},
|
|
6815
|
-
onChangePlace: (place) =>
|
|
6816
|
-
if (centerSource.source !== "recomend") {
|
|
6817
|
-
updateRecommendPlace(place);
|
|
6818
|
-
}
|
|
6819
|
-
emit("changePlace", place);
|
|
6820
|
-
},
|
|
6877
|
+
onChangePlace: (place) => emit("changePlace", place),
|
|
6821
6878
|
onChange: async ({
|
|
6822
6879
|
place,
|
|
6823
6880
|
inputPlace,
|
|
6824
|
-
isInZone
|
|
6881
|
+
isInZone,
|
|
6882
|
+
isSameZone
|
|
6825
6883
|
}) => {
|
|
6826
6884
|
centerSource.source = "recomend";
|
|
6827
6885
|
if (isPlaceEqual(place, centerPlace))
|
|
@@ -6829,12 +6887,13 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6829
6887
|
Object.assign(centerPlace, {
|
|
6830
6888
|
...place
|
|
6831
6889
|
});
|
|
6832
|
-
if (isInZone)
|
|
6890
|
+
if (isInZone && !isSameZone)
|
|
6833
6891
|
setZoom(ZONE_ZOOM);
|
|
6834
6892
|
emit("changeRecomandPlace", {
|
|
6835
6893
|
place,
|
|
6836
6894
|
inputPlace,
|
|
6837
|
-
isInZone
|
|
6895
|
+
isInZone,
|
|
6896
|
+
isSameZone
|
|
6838
6897
|
});
|
|
6839
6898
|
}
|
|
6840
6899
|
});
|
|
@@ -6857,7 +6916,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6857
6916
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
6858
6917
|
return h(HeycarMap, {
|
|
6859
6918
|
"attrs": {
|
|
6860
|
-
"center":
|
|
6919
|
+
"center": place2point(centerPlace),
|
|
6861
6920
|
"zoom": zoomRef.value,
|
|
6862
6921
|
"touchZoomCenter": true,
|
|
6863
6922
|
"mapRef": setMap,
|
|
@@ -6933,7 +6992,6 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6933
6992
|
name: defaultPlace.name,
|
|
6934
6993
|
displayName: defaultPlace.displayName
|
|
6935
6994
|
});
|
|
6936
|
-
const centerPoint = computed(() => [centerPlace.lng, centerPlace.lat]);
|
|
6937
6995
|
const centerSource = {
|
|
6938
6996
|
source: "default"
|
|
6939
6997
|
};
|
|
@@ -6944,24 +7002,19 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6944
7002
|
const setCenterPlaceByUserSpecified = async (input) => {
|
|
6945
7003
|
centerSource.source = "api";
|
|
6946
7004
|
const place = toPlaceType(input);
|
|
6947
|
-
centerPlace
|
|
6948
|
-
centerPlace.lat = place.lat;
|
|
6949
|
-
centerPlace.name = place.name;
|
|
6950
|
-
centerPlace.displayName = place.displayName;
|
|
6951
|
-
emit("changePlace", {
|
|
6952
|
-
...place
|
|
6953
|
-
});
|
|
7005
|
+
Object.assign(centerPlace, place);
|
|
6954
7006
|
updateRecommendPlace(place);
|
|
6955
7007
|
};
|
|
6956
|
-
const setCenterPlaceByUserSpecifiedInZone = ({
|
|
6957
|
-
place,
|
|
6958
|
-
recommends
|
|
7008
|
+
const setCenterPlaceByUserSpecifiedInZone = async ({
|
|
7009
|
+
place: inputPlace,
|
|
7010
|
+
recommends: inputRecommends
|
|
6959
7011
|
}) => {
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
7012
|
+
const place = toPlaceType(inputPlace);
|
|
7013
|
+
const recommends = toRecommendZonePlacesType(inputRecommends);
|
|
7014
|
+
const isSameZone = recommends.zone && isZoneEqual(recommends.zone, zoneRef.value);
|
|
7015
|
+
if (!isSameZone)
|
|
7016
|
+
setZoom(ZONE_ZOOM);
|
|
7017
|
+
Object.assign(centerPlace, place);
|
|
6965
7018
|
setPlaceCandidatesAndZone(recommends);
|
|
6966
7019
|
emit("changePlace", {
|
|
6967
7020
|
...place
|
|
@@ -6970,12 +7023,7 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6970
7023
|
const panToCenterByPlace = async (place) => {
|
|
6971
7024
|
centerSource.source = "api";
|
|
6972
7025
|
await panTo(place2point(place));
|
|
6973
|
-
centerPlace
|
|
6974
|
-
centerPlace.lat = place.lat;
|
|
6975
|
-
centerPlace.name = place.name;
|
|
6976
|
-
centerPlace.displayName = place.displayName;
|
|
6977
|
-
if (zoneRef.value)
|
|
6978
|
-
setZoom(ZONE_ZOOM);
|
|
7026
|
+
Object.assign(centerPlace, place);
|
|
6979
7027
|
emit("changePlace", {
|
|
6980
7028
|
...place
|
|
6981
7029
|
});
|
|
@@ -6986,7 +7034,8 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6986
7034
|
inputPlace: {
|
|
6987
7035
|
...place
|
|
6988
7036
|
},
|
|
6989
|
-
isInZone: !!zoneRef.value
|
|
7037
|
+
isInZone: !!zoneRef.value,
|
|
7038
|
+
isSameZone: !!zoneRef.value
|
|
6990
7039
|
});
|
|
6991
7040
|
};
|
|
6992
7041
|
const {
|
|
@@ -7029,7 +7078,7 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7029
7078
|
availableRef,
|
|
7030
7079
|
isElectedRef
|
|
7031
7080
|
} = useMapRecomendPlace({
|
|
7032
|
-
|
|
7081
|
+
defaultPoint: place2point(centerPlace),
|
|
7033
7082
|
emptyPlaceName: DEFAULT_PLACE_NAME,
|
|
7034
7083
|
context: centerSource,
|
|
7035
7084
|
getRecomendPlace: pipedGetRecomendPlace,
|
|
@@ -7046,16 +7095,12 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7046
7095
|
throw new Error(`MyError: should not call getLimit on source: ${source}`);
|
|
7047
7096
|
}
|
|
7048
7097
|
},
|
|
7049
|
-
onChangePlace: (place) =>
|
|
7050
|
-
if (centerSource.source !== "recomend") {
|
|
7051
|
-
updateRecommendPlace(place);
|
|
7052
|
-
}
|
|
7053
|
-
emit("changePlace", place);
|
|
7054
|
-
},
|
|
7098
|
+
onChangePlace: (place) => emit("changePlace", place),
|
|
7055
7099
|
onChange: async ({
|
|
7056
7100
|
place,
|
|
7057
7101
|
inputPlace,
|
|
7058
|
-
isInZone
|
|
7102
|
+
isInZone,
|
|
7103
|
+
isSameZone
|
|
7059
7104
|
}) => {
|
|
7060
7105
|
centerSource.source = "recomend";
|
|
7061
7106
|
if (isPlaceEqual(place, centerPlace))
|
|
@@ -7063,12 +7108,13 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7063
7108
|
Object.assign(centerPlace, {
|
|
7064
7109
|
...place
|
|
7065
7110
|
});
|
|
7066
|
-
if (isInZone)
|
|
7111
|
+
if (isInZone && !isSameZone)
|
|
7067
7112
|
setZoom(ZONE_ZOOM);
|
|
7068
7113
|
emit("changeRecomandPlace", {
|
|
7069
7114
|
place,
|
|
7070
7115
|
inputPlace,
|
|
7071
|
-
isInZone
|
|
7116
|
+
isInZone,
|
|
7117
|
+
isSameZone
|
|
7072
7118
|
});
|
|
7073
7119
|
}
|
|
7074
7120
|
});
|
|
@@ -7094,7 +7140,7 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7094
7140
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
7095
7141
|
return h(HeycarMap, {
|
|
7096
7142
|
"attrs": {
|
|
7097
|
-
"center":
|
|
7143
|
+
"center": place2point(centerPlace),
|
|
7098
7144
|
"zoom": zoomRef.value,
|
|
7099
7145
|
"touchZoomCenter": true,
|
|
7100
7146
|
"mapRef": setMap,
|
|
@@ -7129,38 +7175,6 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7129
7175
|
})]);
|
|
7130
7176
|
};
|
|
7131
7177
|
}).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "getRecomendPlace", "mapContext"]);
|
|
7132
|
-
const useAmapGeometry = () => {
|
|
7133
|
-
const payload = useMapSupplier();
|
|
7134
|
-
const apiMapDistance = (from, to) => {
|
|
7135
|
-
if (payload.status !== Status.SUCCESS)
|
|
7136
|
-
return void 0;
|
|
7137
|
-
return AMap.GeometryUtil.distance(from, to);
|
|
7138
|
-
};
|
|
7139
|
-
const apiMapDistanceToLine = (from, line) => {
|
|
7140
|
-
if (payload.status !== Status.SUCCESS)
|
|
7141
|
-
return void 0;
|
|
7142
|
-
return AMap.GeometryUtil.distanceToLine(from, line);
|
|
7143
|
-
};
|
|
7144
|
-
return { apiMapDistance, apiMapDistanceToLine };
|
|
7145
|
-
};
|
|
7146
|
-
const useGmapGeometry = () => {
|
|
7147
|
-
const payload = useMapSupplier();
|
|
7148
|
-
const apiMapDistance = (from, to) => {
|
|
7149
|
-
if (payload.status !== Status.SUCCESS)
|
|
7150
|
-
return void 0;
|
|
7151
|
-
return google.maps.geometry.spherical.computeDistanceBetween(vec2lnglat(from), vec2lnglat(to));
|
|
7152
|
-
};
|
|
7153
|
-
const apiMapDistanceToLine = (from, line) => {
|
|
7154
|
-
if (payload.status !== Status.SUCCESS)
|
|
7155
|
-
return void 0;
|
|
7156
|
-
return 0;
|
|
7157
|
-
};
|
|
7158
|
-
return { apiMapDistance, apiMapDistanceToLine };
|
|
7159
|
-
};
|
|
7160
|
-
const useMapGeometry = () => {
|
|
7161
|
-
const { supplier } = useMapSupplier();
|
|
7162
|
-
return supplier === "gmap" ? useGmapGeometry() : useAmapGeometry();
|
|
7163
|
-
};
|
|
7164
7178
|
const imgTaxicar = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAyNmMtMS4zNDIgMC0yLjQwNi0uODQ3LTIuNDA2LS44NDdDLjE0IDEyLjkzMiAwIDExLjA5IDAgMTEuMDlWNS44NnMuMTQtMS44NDIgMi41Mi0zLjU4M2MwIDAgMS4wNjQtLjg0NiAyLjQwNi0uODQ2IDEuMzQxIDAgOS4xMy0uMDI2IDkuMTMtLjAyNmw5Ljg5Ny0uMTQ0IDQuMTE2LjE5MnM0LjQ4NCAwIDUuMjM2LjgzM2MuNzc4Ljg2Ljc4MiAxLjM3Ljc4MiAzLjc0djQuOTM0eiIgaWQ9InByZWZpeF9fYiIvPjxwYXRoIGQ9Ik0wIDEuNDkzUzUuNy4xOCA4LjcxOS4wNWMzLjAyLS4xMzEgMy40Ny4wMTcgNS4yODIuMjEuNTA3LjA1MSAzLjI2LjkxIDMuMjYuOTFsLTcuMzAzLjNMMCAxLjQ5NHoiIGlkPSJwcmVmaXhfX2MiLz48cGF0aCBkPSJNMTAuMDggMi44MTVDOS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L3N2Zz4=";
|
|
7165
7179
|
const TaxiCar_css_ts_vanilla = "";
|
|
7166
7180
|
var carIcon = "_65j3sr1";
|
|
@@ -7514,12 +7528,16 @@ const SectionDispatching = defineSetup(function SectionDispatching2(props) {
|
|
|
7514
7528
|
title,
|
|
7515
7529
|
registerOverlay
|
|
7516
7530
|
} = props;
|
|
7531
|
+
const {
|
|
7532
|
+
language
|
|
7533
|
+
} = useMapSupplier();
|
|
7517
7534
|
const from = place2point(fromPlace);
|
|
7518
7535
|
return h("div", [h(StartEndPoint, {
|
|
7519
7536
|
"attrs": {
|
|
7520
7537
|
"type": "start",
|
|
7521
7538
|
"position": from,
|
|
7522
7539
|
"title": title,
|
|
7540
|
+
"language": language,
|
|
7523
7541
|
"registerOverlay": registerOverlay
|
|
7524
7542
|
}
|
|
7525
7543
|
}), h(WaveCircle, {
|
|
@@ -7545,6 +7563,9 @@ const SectionDispatching = defineSetup(function SectionDispatching2(props) {
|
|
|
7545
7563
|
};
|
|
7546
7564
|
});
|
|
7547
7565
|
const SectionConfirmed = defineSetup(function SectionConfirmed2(props) {
|
|
7566
|
+
const {
|
|
7567
|
+
language
|
|
7568
|
+
} = useMapSupplier();
|
|
7548
7569
|
const {
|
|
7549
7570
|
apiMapDistance
|
|
7550
7571
|
} = useMapGeometry();
|
|
@@ -7582,13 +7603,15 @@ const SectionConfirmed = defineSetup(function SectionConfirmed2(props) {
|
|
|
7582
7603
|
"attrs": {
|
|
7583
7604
|
"type": "start",
|
|
7584
7605
|
"registerOverlay": registerOverlay,
|
|
7585
|
-
"position": from
|
|
7606
|
+
"position": from,
|
|
7607
|
+
"language": language
|
|
7586
7608
|
}
|
|
7587
7609
|
}), h(StartEndPoint, {
|
|
7588
7610
|
"attrs": {
|
|
7589
7611
|
"type": "end",
|
|
7590
7612
|
"registerOverlay": registerOverlay,
|
|
7591
|
-
"position": to
|
|
7613
|
+
"position": to,
|
|
7614
|
+
"language": language
|
|
7592
7615
|
}
|
|
7593
7616
|
}), h(PlaceCircle, {
|
|
7594
7617
|
"attrs": {
|
|
@@ -7619,6 +7642,9 @@ const SectionDriverStartService = defineSetup(function SectionDriverStartService
|
|
|
7619
7642
|
registerOverlay
|
|
7620
7643
|
} = props;
|
|
7621
7644
|
const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
|
|
7645
|
+
const {
|
|
7646
|
+
language
|
|
7647
|
+
} = useMapSupplier();
|
|
7622
7648
|
const {
|
|
7623
7649
|
apiMapDistance
|
|
7624
7650
|
} = useMapGeometry();
|
|
@@ -7645,7 +7671,8 @@ const SectionDriverStartService = defineSetup(function SectionDriverStartService
|
|
|
7645
7671
|
"attrs": {
|
|
7646
7672
|
"type": "start",
|
|
7647
7673
|
"position": from,
|
|
7648
|
-
"registerOverlay": registerOverlay
|
|
7674
|
+
"registerOverlay": registerOverlay,
|
|
7675
|
+
"language": language
|
|
7649
7676
|
}
|
|
7650
7677
|
}), h(PlaceCircle, {
|
|
7651
7678
|
"attrs": {
|
|
@@ -7720,6 +7747,9 @@ const SectionBookDispatched = defineSetup(function SectionBookDispatched2(props)
|
|
|
7720
7747
|
const {
|
|
7721
7748
|
apiMapDistance
|
|
7722
7749
|
} = useMapGeometry();
|
|
7750
|
+
const {
|
|
7751
|
+
language
|
|
7752
|
+
} = useMapSupplier();
|
|
7723
7753
|
return () => {
|
|
7724
7754
|
const {
|
|
7725
7755
|
from: fromPlace,
|
|
@@ -7766,13 +7796,15 @@ const SectionBookDispatched = defineSetup(function SectionBookDispatched2(props)
|
|
|
7766
7796
|
"attrs": {
|
|
7767
7797
|
"type": "start",
|
|
7768
7798
|
"registerOverlay": registerOverlay,
|
|
7769
|
-
"position": from
|
|
7799
|
+
"position": from,
|
|
7800
|
+
"language": language
|
|
7770
7801
|
}
|
|
7771
7802
|
}), h(StartEndPoint, {
|
|
7772
7803
|
"attrs": {
|
|
7773
7804
|
"type": "end",
|
|
7774
7805
|
"registerOverlay": registerOverlay,
|
|
7775
|
-
"position": to
|
|
7806
|
+
"position": to,
|
|
7807
|
+
"language": language
|
|
7776
7808
|
}
|
|
7777
7809
|
}), h(PlaceCircle, {
|
|
7778
7810
|
"attrs": {
|
|
@@ -7803,6 +7835,9 @@ const SectionDriverArrived = defineSetup(function SectionDriverArrived2(props) {
|
|
|
7803
7835
|
registerOverlay
|
|
7804
7836
|
} = props;
|
|
7805
7837
|
const fittableRegistryOverlay = createFittableRegisterOverlay(registerOverlay);
|
|
7838
|
+
const {
|
|
7839
|
+
language
|
|
7840
|
+
} = useMapSupplier();
|
|
7806
7841
|
const {
|
|
7807
7842
|
apiMapDistance
|
|
7808
7843
|
} = useMapGeometry();
|
|
@@ -7847,7 +7882,8 @@ const SectionDriverArrived = defineSetup(function SectionDriverArrived2(props) {
|
|
|
7847
7882
|
"attrs": {
|
|
7848
7883
|
"type": "start",
|
|
7849
7884
|
"position": from,
|
|
7850
|
-
"registerOverlay": registerOverlay
|
|
7885
|
+
"registerOverlay": registerOverlay,
|
|
7886
|
+
"language": language
|
|
7851
7887
|
}
|
|
7852
7888
|
}), h(PlaceCircle, {
|
|
7853
7889
|
"attrs": {
|
|
@@ -7880,6 +7916,9 @@ const SectionInService = defineSetup(function SectionInService2(props) {
|
|
|
7880
7916
|
renderTitle
|
|
7881
7917
|
} = props;
|
|
7882
7918
|
const to = place2point(toPlace);
|
|
7919
|
+
const {
|
|
7920
|
+
language
|
|
7921
|
+
} = useMapSupplier();
|
|
7883
7922
|
const {
|
|
7884
7923
|
apiMapDistance
|
|
7885
7924
|
} = useMapGeometry();
|
|
@@ -7927,7 +7966,8 @@ const SectionInService = defineSetup(function SectionInService2(props) {
|
|
|
7927
7966
|
"attrs": {
|
|
7928
7967
|
"type": "end",
|
|
7929
7968
|
"position": to,
|
|
7930
|
-
"registerOverlay": registerOverlay
|
|
7969
|
+
"registerOverlay": registerOverlay,
|
|
7970
|
+
"language": language
|
|
7931
7971
|
}
|
|
7932
7972
|
}), h(PlaceCircle, {
|
|
7933
7973
|
"attrs": {
|
|
@@ -7948,6 +7988,9 @@ const SectionInService = defineSetup(function SectionInService2(props) {
|
|
|
7948
7988
|
};
|
|
7949
7989
|
});
|
|
7950
7990
|
const SectionCanceled = defineSetup(function SectionCanceled2(props) {
|
|
7991
|
+
const {
|
|
7992
|
+
language
|
|
7993
|
+
} = useMapSupplier();
|
|
7951
7994
|
return () => {
|
|
7952
7995
|
const {
|
|
7953
7996
|
from: fromPlace,
|
|
@@ -7960,13 +8003,15 @@ const SectionCanceled = defineSetup(function SectionCanceled2(props) {
|
|
|
7960
8003
|
"attrs": {
|
|
7961
8004
|
"type": "start",
|
|
7962
8005
|
"position": from,
|
|
7963
|
-
"registerOverlay": registerOverlay
|
|
8006
|
+
"registerOverlay": registerOverlay,
|
|
8007
|
+
"language": language
|
|
7964
8008
|
}
|
|
7965
8009
|
}), h(StartEndPoint, {
|
|
7966
8010
|
"attrs": {
|
|
7967
8011
|
"type": "end",
|
|
7968
8012
|
"position": to,
|
|
7969
|
-
"registerOverlay": registerOverlay
|
|
8013
|
+
"registerOverlay": registerOverlay,
|
|
8014
|
+
"language": language
|
|
7970
8015
|
}
|
|
7971
8016
|
}), h(PlaceCircle, {
|
|
7972
8017
|
"attrs": {
|
|
@@ -7993,6 +8038,9 @@ const SectionCanceled = defineSetup(function SectionCanceled2(props) {
|
|
|
7993
8038
|
};
|
|
7994
8039
|
});
|
|
7995
8040
|
const SectionEndService = defineSetup(function SectionEndService2(props) {
|
|
8041
|
+
const {
|
|
8042
|
+
language
|
|
8043
|
+
} = useMapSupplier();
|
|
7996
8044
|
return () => {
|
|
7997
8045
|
const {
|
|
7998
8046
|
from: fromPlace,
|
|
@@ -8018,13 +8066,15 @@ const SectionEndService = defineSetup(function SectionEndService2(props) {
|
|
|
8018
8066
|
"attrs": {
|
|
8019
8067
|
"type": "start",
|
|
8020
8068
|
"position": from,
|
|
8021
|
-
"registerOverlay": registerOverlay
|
|
8069
|
+
"registerOverlay": registerOverlay,
|
|
8070
|
+
"language": language
|
|
8022
8071
|
}
|
|
8023
8072
|
}), h(StartEndPoint, {
|
|
8024
8073
|
"attrs": {
|
|
8025
8074
|
"type": "end",
|
|
8026
8075
|
"position": to,
|
|
8027
|
-
"registerOverlay": registerOverlay
|
|
8076
|
+
"registerOverlay": registerOverlay,
|
|
8077
|
+
"language": language
|
|
8028
8078
|
}
|
|
8029
8079
|
}), h(PlaceCircle, {
|
|
8030
8080
|
"attrs": {
|