@heycar/heycars-map 0.9.9 → 0.10.0-graspRoad
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 +306 -33
- package/dist/index.js +306 -33
- package/dist/src/api/contants.d.ts +2 -0
- package/dist/src/business-components/AuxiliaryGraspRoad/AuxiliaryGraspRoad.d.ts +8 -0
- package/dist/src/business-components/AuxiliaryGraspRoad/index.d.ts +1 -0
- package/dist/src/business-components/AuxiliaryLine/AuxiliaryLine.d.ts +10 -0
- package/dist/src/business-components/AuxiliaryLine/index.d.ts +1 -0
- package/dist/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +0 -1
- package/dist/src/business-components/BusinessReselectPlaceMap/BusinessReselectPlaceMap.d.ts +2 -2
- package/dist/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +2 -1
- package/dist/src/business-components/GraspRoad/GraspRoad.d.ts +9 -0
- package/dist/src/business-components/GraspRoad/index.d.ts +1 -0
- package/dist/src/business-components/TaxiCar/TaxiCar.d.ts +1 -0
- package/dist/src/hooks/useMapGCJ02.d.ts +3 -0
- package/dist/src/hooks/useMapGraspRoad.d.ts +9 -0
- package/dist/src/types/interface.d.ts +7 -0
- package/dist/src/utils/mockDriverPositions.d.ts +10 -0
- package/dist/src/utils/transform.d.ts +22 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
9
9
|
const Vue = require("vue");
|
|
10
10
|
const style_css_ts_vanilla = "";
|
|
11
11
|
const name = "@heycar/heycars-map";
|
|
12
|
-
const version = "0.
|
|
12
|
+
const version = "0.10.0-graspRoad";
|
|
13
13
|
const type = "module";
|
|
14
14
|
const bin = {
|
|
15
15
|
checkVersion: "./bin/checkVersion.js"
|
|
@@ -1172,12 +1172,15 @@ const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
|
1172
1172
|
const ZINDEX_PLACE_LAYER = 30;
|
|
1173
1173
|
const ZINDEX_CAR_LAYER = 21;
|
|
1174
1174
|
const ZINDEX_PASSENGER_LAYER = 20;
|
|
1175
|
+
const ZINDEX_AUXILIARY_GRASP = 14;
|
|
1175
1176
|
const ZINDEX_LINE_LAYER = 12;
|
|
1176
1177
|
const ZINDEX_GREEN_ZONE = 10;
|
|
1178
|
+
const IS_ENABLE_AUXILIARY_GRASP_ROAD = location.search.includes("enableAuxiliaryGraspRoad");
|
|
1177
1179
|
const vec2lnglat = ([lng, lat]) => ({
|
|
1178
1180
|
lng: Number(lng),
|
|
1179
1181
|
lat: Number(lat)
|
|
1180
1182
|
});
|
|
1183
|
+
const lnglat2point = ({ lng, lat }) => [lng, lat];
|
|
1181
1184
|
const decodeAsterisk = (encodedValue) => {
|
|
1182
1185
|
const result = [];
|
|
1183
1186
|
const tokens = encodedValue.split("*");
|
|
@@ -1324,6 +1327,23 @@ const toRecommendZonePlacesType = (maybeRecomendZonePlaces) => {
|
|
|
1324
1327
|
return throwTypeError("RecommendZonePlaces", maybeRecomendZonePlaces, err == null ? void 0 : err.message);
|
|
1325
1328
|
}
|
|
1326
1329
|
};
|
|
1330
|
+
const toTrackPoint = (maybeTrackPoint) => {
|
|
1331
|
+
var _a;
|
|
1332
|
+
const lng = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.lng);
|
|
1333
|
+
const lat = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.lat);
|
|
1334
|
+
const angle = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.angle);
|
|
1335
|
+
const timestamp = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.timestamp);
|
|
1336
|
+
const speed = Number((_a = maybeTrackPoint == null ? void 0 : maybeTrackPoint.speed) != null ? _a : 0);
|
|
1337
|
+
if (isNaN(lng) || isNaN(lat) || isNaN(angle) || isNaN(timestamp)) {
|
|
1338
|
+
throwTypeError("TrackPoint", maybeTrackPoint);
|
|
1339
|
+
}
|
|
1340
|
+
return { lng, lat, angle, speed, timestamp };
|
|
1341
|
+
};
|
|
1342
|
+
const toTrackPoints = (maybeTrackPoints) => {
|
|
1343
|
+
if (!isArray$1(maybeTrackPoints))
|
|
1344
|
+
throwTypeError("TrackPoint[]", maybeTrackPoints);
|
|
1345
|
+
return maybeTrackPoints.map(toTrackPoint);
|
|
1346
|
+
};
|
|
1327
1347
|
const wxGetLocationSuccessResponse2GeolocationPosition = (res) => {
|
|
1328
1348
|
const { longitude, latitude, accuracy } = res;
|
|
1329
1349
|
const speed = Number(res.speed);
|
|
@@ -1339,9 +1359,23 @@ const wxGetLocationSuccessResponse2GeolocationPosition = (res) => {
|
|
|
1339
1359
|
};
|
|
1340
1360
|
return { timestamp, coords };
|
|
1341
1361
|
};
|
|
1362
|
+
const trackPoints2amapGraspRoadPoints = (trackPoints) => {
|
|
1363
|
+
var _a;
|
|
1364
|
+
const baseTime = (_a = trackPoints[0]) == null ? void 0 : _a.timestamp;
|
|
1365
|
+
return trackPoints.map((item, index) => {
|
|
1366
|
+
const { lng, lat, angle, speed, timestamp } = item;
|
|
1367
|
+
const tm = Math.floor((index === 0 ? baseTime : timestamp - baseTime) / 1e3);
|
|
1368
|
+
return { x: lng, y: lat, ag: angle != null ? angle : 0, sp: speed != null ? speed : 0, tm };
|
|
1369
|
+
});
|
|
1370
|
+
};
|
|
1371
|
+
const toGCJ02TrackPoints = async (trackPoints, transform) => {
|
|
1372
|
+
const points = await transform(trackPoints.map(lnglat2point));
|
|
1373
|
+
return trackPoints.map((item, idx) => ({ ...item, lng: points[idx][0], lat: points[idx][1] }));
|
|
1374
|
+
};
|
|
1342
1375
|
const deepCompareEqualsForMaps = createComparator((deepEqual) => (a, b) => {
|
|
1343
1376
|
if (isLatLngLiteral(a) && isLatLngLiteral(b)) {
|
|
1344
|
-
|
|
1377
|
+
const result = isPlaceEqual(a, b);
|
|
1378
|
+
return result;
|
|
1345
1379
|
}
|
|
1346
1380
|
return deepEqual(a, b);
|
|
1347
1381
|
});
|
|
@@ -2128,7 +2162,8 @@ const DEFAULT_AMAP_PLUGINS = [
|
|
|
2128
2162
|
"AMap.Geocoder",
|
|
2129
2163
|
"AMap.PlaceSearch",
|
|
2130
2164
|
"AMap.Driving",
|
|
2131
|
-
"AMap.Walking"
|
|
2165
|
+
"AMap.Walking",
|
|
2166
|
+
"AMap.GraspRoad"
|
|
2132
2167
|
];
|
|
2133
2168
|
const DEFAULT_GMAP_LIBRARIES = ["marker", "places", "geometry"];
|
|
2134
2169
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
@@ -3962,16 +3997,15 @@ class SingleGeoWatch {
|
|
|
3962
3997
|
}
|
|
3963
3998
|
const useAmapGCJ02 = () => {
|
|
3964
3999
|
const { readyPromise } = useMapSupplier();
|
|
3965
|
-
async function
|
|
4000
|
+
async function toGcj02Points(points) {
|
|
3966
4001
|
await readyPromise;
|
|
3967
4002
|
return new Promise((resolve, reject) => {
|
|
3968
4003
|
AMap.convertFrom(
|
|
3969
|
-
|
|
4004
|
+
points,
|
|
3970
4005
|
"gps",
|
|
3971
4006
|
(_, result) => {
|
|
3972
4007
|
if (result.info === "ok") {
|
|
3973
|
-
|
|
3974
|
-
resolve([lng, lat]);
|
|
4008
|
+
resolve(result.locations.map(lnglat2point));
|
|
3975
4009
|
} else {
|
|
3976
4010
|
reject();
|
|
3977
4011
|
}
|
|
@@ -3979,11 +4013,15 @@ const useAmapGCJ02 = () => {
|
|
|
3979
4013
|
);
|
|
3980
4014
|
});
|
|
3981
4015
|
}
|
|
3982
|
-
|
|
4016
|
+
function toGcj02(point) {
|
|
4017
|
+
return toGcj02Points([point]).then(([result]) => result);
|
|
4018
|
+
}
|
|
4019
|
+
return { toGcj02, toGcj02Points };
|
|
3983
4020
|
};
|
|
3984
4021
|
const useGmapGCJ02 = () => {
|
|
3985
4022
|
const toGcj02 = async (point) => point;
|
|
3986
|
-
|
|
4023
|
+
const toGcj02Points = async (points) => points;
|
|
4024
|
+
return { toGcj02, toGcj02Points };
|
|
3987
4025
|
};
|
|
3988
4026
|
const useMapGCJ02 = () => {
|
|
3989
4027
|
const { supplier } = useMapSupplier();
|
|
@@ -6926,8 +6964,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6926
6964
|
const {
|
|
6927
6965
|
geoLoadingTitle: geoLoadingTitle2,
|
|
6928
6966
|
recomendDescription,
|
|
6929
|
-
unavailableTitle
|
|
6930
|
-
disableLocator
|
|
6967
|
+
unavailableTitle
|
|
6931
6968
|
} = props;
|
|
6932
6969
|
const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
|
|
6933
6970
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
@@ -6965,14 +7002,14 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6965
7002
|
"title": title,
|
|
6966
7003
|
"description": description,
|
|
6967
7004
|
"type": isDragging.value ? "locator" : "box",
|
|
6968
|
-
"withArrow":
|
|
7005
|
+
"withArrow": true
|
|
6969
7006
|
},
|
|
6970
7007
|
"on": {
|
|
6971
|
-
"click": () =>
|
|
7008
|
+
"click": () => emit("clickLocator")
|
|
6972
7009
|
}
|
|
6973
7010
|
})]);
|
|
6974
7011
|
};
|
|
6975
|
-
}).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "
|
|
7012
|
+
}).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "fallback", "geoDefaultPosition", "getRecomendPlace", "getDefaultCenterPlace", "loading", "mapContext"]);
|
|
6976
7013
|
const emptyPlace = {
|
|
6977
7014
|
lng: 0,
|
|
6978
7015
|
lat: 0,
|
|
@@ -6986,7 +7023,6 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6986
7023
|
const {
|
|
6987
7024
|
getRecomendPlace,
|
|
6988
7025
|
mapContext,
|
|
6989
|
-
disableLocator,
|
|
6990
7026
|
defaultPlace = {
|
|
6991
7027
|
...emptyPlace
|
|
6992
7028
|
}
|
|
@@ -7193,15 +7229,11 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7193
7229
|
"attrs": {
|
|
7194
7230
|
"title": title,
|
|
7195
7231
|
"description": description,
|
|
7196
|
-
"type": isDragging.value ? "locator" : "box"
|
|
7197
|
-
"withArrow": !disableLocator
|
|
7198
|
-
},
|
|
7199
|
-
"on": {
|
|
7200
|
-
"click": () => disableLocator ? null : emit("clickLocator")
|
|
7232
|
+
"type": isDragging.value ? "locator" : "box"
|
|
7201
7233
|
}
|
|
7202
7234
|
})]);
|
|
7203
7235
|
};
|
|
7204
|
-
}).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "
|
|
7236
|
+
}).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "getRecomendPlace", "mapContext"]);
|
|
7205
7237
|
const imgTaxicar = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAyNmMtMS4zNDIgMC0yLjQwNi0uODQ3LTIuNDA2LS44NDdDLjE0IDEyLjkzMiAwIDExLjA5IDAgMTEuMDlWNS44NnMuMTQtMS44NDIgMi41Mi0zLjU4M2MwIDAgMS4wNjQtLjg0NiAyLjQwNi0uODQ2IDEuMzQxIDAgOS4xMy0uMDI2IDkuMTMtLjA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4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";
|
|
7206
7238
|
const TaxiCar_css_ts_vanilla = "";
|
|
7207
7239
|
var carIcon = "_65j3sr1";
|
|
@@ -7212,9 +7244,9 @@ var pointSingleInfoBox = "_4a4ovk2";
|
|
|
7212
7244
|
var taxiCarTitle = "_65j3sr4";
|
|
7213
7245
|
const ATaxiCar = defineSetup(function ATaxiCar2(props) {
|
|
7214
7246
|
const contentRef = Vue.computed(() => {
|
|
7215
|
-
var _a;
|
|
7247
|
+
var _a, _b;
|
|
7216
7248
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
7217
|
-
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg)`;
|
|
7249
|
+
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
7218
7250
|
if (!props.title)
|
|
7219
7251
|
return {
|
|
7220
7252
|
img: `<img class="ATaxiCar ${carIcon}" src="${imgTaxicar}" style="${carStyle}">`
|
|
@@ -7256,9 +7288,9 @@ const ATaxiCar = defineSetup(function ATaxiCar2(props) {
|
|
|
7256
7288
|
});
|
|
7257
7289
|
const GTaxiCar = defineSetup(function GTaxiCar2(props) {
|
|
7258
7290
|
const contentRef = Vue.computed(() => {
|
|
7259
|
-
var _a;
|
|
7291
|
+
var _a, _b;
|
|
7260
7292
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
7261
|
-
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg)`;
|
|
7293
|
+
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
7262
7294
|
if (!props.title)
|
|
7263
7295
|
return {
|
|
7264
7296
|
img: createDom("img", {
|
|
@@ -7545,8 +7577,8 @@ const WaveCircle = defineSetup(function WaveCircle2(props) {
|
|
|
7545
7577
|
});
|
|
7546
7578
|
const PASSENGER_DISTANCE_MAX = 2e3;
|
|
7547
7579
|
const PASSENGER_DISTANCE_MIN = 10;
|
|
7548
|
-
const CAR_DISTANCE_MIN = 100;
|
|
7549
|
-
const AUTO_FIT_VIEW_INTERVAL = 15e3;
|
|
7580
|
+
const CAR_DISTANCE_MIN = IS_ENABLE_AUXILIARY_GRASP_ROAD ? 0 : 100;
|
|
7581
|
+
const AUTO_FIT_VIEW_INTERVAL = IS_ENABLE_AUXILIARY_GRASP_ROAD ? 24 * 3600 * 1e3 : 15e3;
|
|
7550
7582
|
const carDurationWithinMinDistance = (distance) => Math.floor(distance / 5);
|
|
7551
7583
|
const SectionDispatching = defineSetup(function SectionDispatching2(props) {
|
|
7552
7584
|
return () => {
|
|
@@ -8168,6 +8200,228 @@ const BusinessTaxiEndMap = defineSetup(function BusinessTaxiEndMap2(props) {
|
|
|
8168
8200
|
})]);
|
|
8169
8201
|
};
|
|
8170
8202
|
});
|
|
8203
|
+
const AAuxiliaryLine = defineSetup(function AAuxiliaryLine2(props) {
|
|
8204
|
+
return () => {
|
|
8205
|
+
const {
|
|
8206
|
+
type: type2 = "dashed",
|
|
8207
|
+
color = "red",
|
|
8208
|
+
showDir = false,
|
|
8209
|
+
path,
|
|
8210
|
+
opacity = 1
|
|
8211
|
+
} = props;
|
|
8212
|
+
if (color === "yellow")
|
|
8213
|
+
console.log("color, path = ", color, path);
|
|
8214
|
+
const vw = window.innerWidth * 0.01;
|
|
8215
|
+
const strokeWidth = 1 * vw;
|
|
8216
|
+
const dashLength = 0.3 * vw;
|
|
8217
|
+
if (path.length < 2)
|
|
8218
|
+
return;
|
|
8219
|
+
switch (type2) {
|
|
8220
|
+
case "solid":
|
|
8221
|
+
return Vue.h(AmapPolyline, {
|
|
8222
|
+
"attrs": {
|
|
8223
|
+
"path": path,
|
|
8224
|
+
"strokeWeight": strokeWidth,
|
|
8225
|
+
"strokeOpacity": opacity,
|
|
8226
|
+
"strokeColor": color,
|
|
8227
|
+
"lineJoin": "round",
|
|
8228
|
+
"lineCap": "round",
|
|
8229
|
+
"showDir": showDir,
|
|
8230
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8231
|
+
}
|
|
8232
|
+
});
|
|
8233
|
+
case "dashed":
|
|
8234
|
+
return Vue.h(AmapPolyline, {
|
|
8235
|
+
"attrs": {
|
|
8236
|
+
"path": path,
|
|
8237
|
+
"strokeWeight": strokeWidth,
|
|
8238
|
+
"strokeOpacity": opacity,
|
|
8239
|
+
"strokeColor": color,
|
|
8240
|
+
"lineJoin": "round",
|
|
8241
|
+
"lineCap": "round",
|
|
8242
|
+
"strokeStyle": "dashed",
|
|
8243
|
+
"strokeDasharray": [dashLength, dashLength],
|
|
8244
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8245
|
+
}
|
|
8246
|
+
});
|
|
8247
|
+
case "marker": {
|
|
8248
|
+
const noneRepeatPath = Object.values(Object.fromEntries(path.map((p) => [`${p[0]}|${p[1]}`, p])));
|
|
8249
|
+
const points = noneRepeatPath.map((point) => Vue.h(AmapMarker, {
|
|
8250
|
+
"attrs": {
|
|
8251
|
+
"position": point
|
|
8252
|
+
}
|
|
8253
|
+
}));
|
|
8254
|
+
return Vue.h("div", [points]);
|
|
8255
|
+
}
|
|
8256
|
+
}
|
|
8257
|
+
};
|
|
8258
|
+
});
|
|
8259
|
+
const GAuxiliaryLine = defineSetup(function GAuxiliaryLine2(props) {
|
|
8260
|
+
const pathRef = Vue.computed(() => props.path.map(vec2lnglat));
|
|
8261
|
+
return () => {
|
|
8262
|
+
const {
|
|
8263
|
+
type: type2 = "dashed",
|
|
8264
|
+
color = "red",
|
|
8265
|
+
opacity = 1
|
|
8266
|
+
} = props;
|
|
8267
|
+
const vw = window.innerWidth * 0.01;
|
|
8268
|
+
const strokeWidth = 1.25 * vw * 0.65;
|
|
8269
|
+
if (pathRef.value.length < 2)
|
|
8270
|
+
return;
|
|
8271
|
+
switch (type2) {
|
|
8272
|
+
case "solid":
|
|
8273
|
+
return Vue.h(GmapPolyline, {
|
|
8274
|
+
"attrs": {
|
|
8275
|
+
"path": pathRef.value,
|
|
8276
|
+
"strokeWeight": strokeWidth,
|
|
8277
|
+
"strokeOpacity": opacity,
|
|
8278
|
+
"strokeColor": color,
|
|
8279
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8280
|
+
}
|
|
8281
|
+
});
|
|
8282
|
+
case "dashed":
|
|
8283
|
+
return Vue.h(GmapPolyline, {
|
|
8284
|
+
"attrs": {
|
|
8285
|
+
"path": pathRef.value,
|
|
8286
|
+
"icons": [{
|
|
8287
|
+
icon: {
|
|
8288
|
+
path: `M 0,-0.5 0,0.5`,
|
|
8289
|
+
strokeWeight: strokeWidth,
|
|
8290
|
+
strokeColor: color,
|
|
8291
|
+
strokeOpacity: opacity,
|
|
8292
|
+
fillColor: color,
|
|
8293
|
+
scale: 1
|
|
8294
|
+
},
|
|
8295
|
+
repeat: `${strokeWidth}px`,
|
|
8296
|
+
offset: `${strokeWidth / 2}px`
|
|
8297
|
+
}],
|
|
8298
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8299
|
+
}
|
|
8300
|
+
});
|
|
8301
|
+
case "marker": {
|
|
8302
|
+
const noneRepeatPath = Object.values(Object.fromEntries(pathRef.value.map((p) => [`${p.lng}|${p.lat}`, p])));
|
|
8303
|
+
const points = noneRepeatPath.map((point) => Vue.h(GmapAdvancedMarkerView, {
|
|
8304
|
+
"attrs": {
|
|
8305
|
+
"position": point
|
|
8306
|
+
}
|
|
8307
|
+
}));
|
|
8308
|
+
return Vue.h("div", [points]);
|
|
8309
|
+
}
|
|
8310
|
+
}
|
|
8311
|
+
};
|
|
8312
|
+
});
|
|
8313
|
+
const AuxiliaryLine = defineSetup(function AuxiliaryLine2(props) {
|
|
8314
|
+
const payload = useMapSupplier();
|
|
8315
|
+
return () => {
|
|
8316
|
+
if (!props.path.length)
|
|
8317
|
+
return null;
|
|
8318
|
+
return createElement(payload.supplier === "gmap" ? GAuxiliaryLine : AAuxiliaryLine, {
|
|
8319
|
+
attrs: props
|
|
8320
|
+
});
|
|
8321
|
+
};
|
|
8322
|
+
});
|
|
8323
|
+
const useAmapGraspRoad = (props) => {
|
|
8324
|
+
const amapGraspRoad = new AMap.GraspRoad();
|
|
8325
|
+
const pathRef = Vue.ref([]);
|
|
8326
|
+
watchEffectForDeepOption(
|
|
8327
|
+
() => [...props.tracks],
|
|
8328
|
+
(tracks) => {
|
|
8329
|
+
if (tracks.length < 2) {
|
|
8330
|
+
pathRef.value = tracks.map(lnglat2point);
|
|
8331
|
+
return;
|
|
8332
|
+
}
|
|
8333
|
+
const graspRoadPoints = trackPoints2amapGraspRoadPoints(tracks);
|
|
8334
|
+
amapGraspRoad.driving(graspRoadPoints, (error, result) => {
|
|
8335
|
+
if (error) {
|
|
8336
|
+
console.error(error);
|
|
8337
|
+
pathRef.value = tracks.map(lnglat2point);
|
|
8338
|
+
return;
|
|
8339
|
+
}
|
|
8340
|
+
pathRef.value = result.data.points.map(({ x, y }) => [x, y]);
|
|
8341
|
+
});
|
|
8342
|
+
}
|
|
8343
|
+
);
|
|
8344
|
+
return pathRef;
|
|
8345
|
+
};
|
|
8346
|
+
const useGmapGraspRoad = (props) => {
|
|
8347
|
+
const path = props.tracks.map(({ lng, lat }) => [lng, lat]);
|
|
8348
|
+
return Vue.ref(path);
|
|
8349
|
+
};
|
|
8350
|
+
const useMapGraspRoad = (props) => {
|
|
8351
|
+
const { supplier } = useMapSupplier();
|
|
8352
|
+
return supplier === "gmap" ? useGmapGraspRoad(props) : useAmapGraspRoad(props);
|
|
8353
|
+
};
|
|
8354
|
+
const GraspRoad = defineSetup(function GraspRoad2(props, {
|
|
8355
|
+
slots
|
|
8356
|
+
}) {
|
|
8357
|
+
const pathRef = useMapGraspRoad(props);
|
|
8358
|
+
const renderProps = Vue.reactive({
|
|
8359
|
+
path: pathRef
|
|
8360
|
+
});
|
|
8361
|
+
return () => {
|
|
8362
|
+
var _a;
|
|
8363
|
+
return Vue.h("div", [(_a = slots.render) == null ? void 0 : _a.call(slots, renderProps)]);
|
|
8364
|
+
};
|
|
8365
|
+
});
|
|
8366
|
+
const AuxiliaryGraspRoad = defineSetup(function AuxiliaryGraspRoad2(props) {
|
|
8367
|
+
return () => {
|
|
8368
|
+
const {
|
|
8369
|
+
trackPoints,
|
|
8370
|
+
status,
|
|
8371
|
+
to,
|
|
8372
|
+
from
|
|
8373
|
+
} = props;
|
|
8374
|
+
console.log("trackPoints.length = ", trackPoints.length);
|
|
8375
|
+
if (status !== "inService" && status !== "driverStartService" && status !== "dispatched" && status !== "book-driverStartService")
|
|
8376
|
+
return;
|
|
8377
|
+
const distination = status === "dispatched" || status === "driverStartService" ? from : to;
|
|
8378
|
+
if (!distination)
|
|
8379
|
+
return;
|
|
8380
|
+
return Vue.h("div", [Vue.h(AuxiliaryLine, {
|
|
8381
|
+
"attrs": {
|
|
8382
|
+
"path": trackPoints.map(lnglat2point),
|
|
8383
|
+
"type": "marker"
|
|
8384
|
+
}
|
|
8385
|
+
}), Vue.h(GraspRoad, {
|
|
8386
|
+
"attrs": {
|
|
8387
|
+
"tracks": trackPoints,
|
|
8388
|
+
"render": ({
|
|
8389
|
+
path
|
|
8390
|
+
}) => {
|
|
8391
|
+
const adjustedPosition = path[path.length - 1];
|
|
8392
|
+
return [Vue.h(AuxiliaryLine, {
|
|
8393
|
+
"attrs": {
|
|
8394
|
+
"path": path,
|
|
8395
|
+
"color": "black"
|
|
8396
|
+
}
|
|
8397
|
+
}), !!adjustedPosition && Vue.h(DrivingRoute, {
|
|
8398
|
+
"attrs": {
|
|
8399
|
+
"from": adjustedPosition,
|
|
8400
|
+
"to": lnglat2point(distination),
|
|
8401
|
+
"render": ({
|
|
8402
|
+
path: path2,
|
|
8403
|
+
angle
|
|
8404
|
+
}) => [Vue.h(AuxiliaryLine, {
|
|
8405
|
+
"attrs": {
|
|
8406
|
+
"path": path2,
|
|
8407
|
+
"type": "solid",
|
|
8408
|
+
"showDir": true,
|
|
8409
|
+
"opacity": 0.4
|
|
8410
|
+
}
|
|
8411
|
+
}), Vue.h(TaxiCar, {
|
|
8412
|
+
"attrs": {
|
|
8413
|
+
"position": path2[0],
|
|
8414
|
+
"angle": angle,
|
|
8415
|
+
"opacity": 0.7
|
|
8416
|
+
}
|
|
8417
|
+
})]
|
|
8418
|
+
}
|
|
8419
|
+
})];
|
|
8420
|
+
}
|
|
8421
|
+
}
|
|
8422
|
+
})]);
|
|
8423
|
+
};
|
|
8424
|
+
});
|
|
8171
8425
|
const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "inService", "driverArrived"];
|
|
8172
8426
|
const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap2(props) {
|
|
8173
8427
|
const {
|
|
@@ -8175,10 +8429,14 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
8175
8429
|
registerOverlay,
|
|
8176
8430
|
mapRef: outerSetMap,
|
|
8177
8431
|
getDriverPosition,
|
|
8432
|
+
getDriverPositionTrack,
|
|
8178
8433
|
renderStartSerivceTitle,
|
|
8179
8434
|
renderInServiceTitle
|
|
8180
8435
|
} = props;
|
|
8181
8436
|
const deferedSetFitView = pipeDefer(registerOverlay.setFitView);
|
|
8437
|
+
const {
|
|
8438
|
+
toGcj02Points
|
|
8439
|
+
} = useMapGCJ02();
|
|
8182
8440
|
const {
|
|
8183
8441
|
setMap,
|
|
8184
8442
|
mapElementRef
|
|
@@ -8194,19 +8452,27 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
8194
8452
|
});
|
|
8195
8453
|
const carPositionRef = Vue.ref();
|
|
8196
8454
|
const carAngleRef = Vue.ref();
|
|
8455
|
+
const carTrackPositionsRef = Vue.ref([]);
|
|
8197
8456
|
Vue.watch(() => props.driverStatus, (status, _, onCleanup) => {
|
|
8198
8457
|
if (!STATUS_NEED_CAR_POSITION.includes(status))
|
|
8199
8458
|
return;
|
|
8200
|
-
const update = () => {
|
|
8201
|
-
|
|
8459
|
+
const update = async () => {
|
|
8460
|
+
const [{
|
|
8202
8461
|
position,
|
|
8203
8462
|
angle
|
|
8204
|
-
})
|
|
8463
|
+
}, tracks] = await Promise.all([getDriverPosition(), IS_ENABLE_AUXILIARY_GRASP_ROAD ? getDriverPositionTrack == null ? void 0 : getDriverPositionTrack() : []]);
|
|
8464
|
+
if (IS_ENABLE_AUXILIARY_GRASP_ROAD) {
|
|
8465
|
+
const trackPositions = await toGCJ02TrackPoints(toTrackPoints(tracks), toGcj02Points);
|
|
8466
|
+
carPositionRef.value = lnglat2point(trackPositions[trackPositions.length - 1]);
|
|
8467
|
+
carAngleRef.value = angle;
|
|
8468
|
+
carTrackPositionsRef.value = trackPositions;
|
|
8469
|
+
} else {
|
|
8205
8470
|
assertPoint(position);
|
|
8206
8471
|
assertAngle(angle);
|
|
8207
8472
|
carPositionRef.value = position != null ? position : void 0;
|
|
8208
8473
|
carAngleRef.value = angle;
|
|
8209
|
-
|
|
8474
|
+
carTrackPositionsRef.value = toTrackPoints(tracks);
|
|
8475
|
+
}
|
|
8210
8476
|
};
|
|
8211
8477
|
const timer = setInterval(update, interval);
|
|
8212
8478
|
update();
|
|
@@ -8317,9 +8583,16 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
8317
8583
|
"registerOverlay": registerOverlay
|
|
8318
8584
|
}
|
|
8319
8585
|
})
|
|
8320
|
-
)
|
|
8586
|
+
), IS_ENABLE_AUXILIARY_GRASP_ROAD && Vue.h(AuxiliaryGraspRoad, {
|
|
8587
|
+
"attrs": {
|
|
8588
|
+
"status": driverStatus,
|
|
8589
|
+
"trackPoints": carTrackPositionsRef.value,
|
|
8590
|
+
"from": from,
|
|
8591
|
+
"to": to
|
|
8592
|
+
}
|
|
8593
|
+
})]);
|
|
8321
8594
|
};
|
|
8322
|
-
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
8595
|
+
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "getDriverPositionTrack", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
8323
8596
|
const useBusinessAlarm = (props) => {
|
|
8324
8597
|
const emptyPlaceName = props == null ? void 0 : props.emptyPlaceName;
|
|
8325
8598
|
const { geoPosition, geoError } = useGeoLocation({
|
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_css_ts_vanilla = "";
|
|
9
9
|
const name = "@heycar/heycars-map";
|
|
10
|
-
const version = "0.
|
|
10
|
+
const version = "0.10.0-graspRoad";
|
|
11
11
|
const type = "module";
|
|
12
12
|
const bin = {
|
|
13
13
|
checkVersion: "./bin/checkVersion.js"
|
|
@@ -1170,12 +1170,15 @@ const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
|
1170
1170
|
const ZINDEX_PLACE_LAYER = 30;
|
|
1171
1171
|
const ZINDEX_CAR_LAYER = 21;
|
|
1172
1172
|
const ZINDEX_PASSENGER_LAYER = 20;
|
|
1173
|
+
const ZINDEX_AUXILIARY_GRASP = 14;
|
|
1173
1174
|
const ZINDEX_LINE_LAYER = 12;
|
|
1174
1175
|
const ZINDEX_GREEN_ZONE = 10;
|
|
1176
|
+
const IS_ENABLE_AUXILIARY_GRASP_ROAD = location.search.includes("enableAuxiliaryGraspRoad");
|
|
1175
1177
|
const vec2lnglat = ([lng, lat]) => ({
|
|
1176
1178
|
lng: Number(lng),
|
|
1177
1179
|
lat: Number(lat)
|
|
1178
1180
|
});
|
|
1181
|
+
const lnglat2point = ({ lng, lat }) => [lng, lat];
|
|
1179
1182
|
const decodeAsterisk = (encodedValue) => {
|
|
1180
1183
|
const result = [];
|
|
1181
1184
|
const tokens = encodedValue.split("*");
|
|
@@ -1322,6 +1325,23 @@ const toRecommendZonePlacesType = (maybeRecomendZonePlaces) => {
|
|
|
1322
1325
|
return throwTypeError("RecommendZonePlaces", maybeRecomendZonePlaces, err == null ? void 0 : err.message);
|
|
1323
1326
|
}
|
|
1324
1327
|
};
|
|
1328
|
+
const toTrackPoint = (maybeTrackPoint) => {
|
|
1329
|
+
var _a;
|
|
1330
|
+
const lng = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.lng);
|
|
1331
|
+
const lat = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.lat);
|
|
1332
|
+
const angle = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.angle);
|
|
1333
|
+
const timestamp = Number(maybeTrackPoint == null ? void 0 : maybeTrackPoint.timestamp);
|
|
1334
|
+
const speed = Number((_a = maybeTrackPoint == null ? void 0 : maybeTrackPoint.speed) != null ? _a : 0);
|
|
1335
|
+
if (isNaN(lng) || isNaN(lat) || isNaN(angle) || isNaN(timestamp)) {
|
|
1336
|
+
throwTypeError("TrackPoint", maybeTrackPoint);
|
|
1337
|
+
}
|
|
1338
|
+
return { lng, lat, angle, speed, timestamp };
|
|
1339
|
+
};
|
|
1340
|
+
const toTrackPoints = (maybeTrackPoints) => {
|
|
1341
|
+
if (!isArray$1(maybeTrackPoints))
|
|
1342
|
+
throwTypeError("TrackPoint[]", maybeTrackPoints);
|
|
1343
|
+
return maybeTrackPoints.map(toTrackPoint);
|
|
1344
|
+
};
|
|
1325
1345
|
const wxGetLocationSuccessResponse2GeolocationPosition = (res) => {
|
|
1326
1346
|
const { longitude, latitude, accuracy } = res;
|
|
1327
1347
|
const speed = Number(res.speed);
|
|
@@ -1337,9 +1357,23 @@ const wxGetLocationSuccessResponse2GeolocationPosition = (res) => {
|
|
|
1337
1357
|
};
|
|
1338
1358
|
return { timestamp, coords };
|
|
1339
1359
|
};
|
|
1360
|
+
const trackPoints2amapGraspRoadPoints = (trackPoints) => {
|
|
1361
|
+
var _a;
|
|
1362
|
+
const baseTime = (_a = trackPoints[0]) == null ? void 0 : _a.timestamp;
|
|
1363
|
+
return trackPoints.map((item, index) => {
|
|
1364
|
+
const { lng, lat, angle, speed, timestamp } = item;
|
|
1365
|
+
const tm = Math.floor((index === 0 ? baseTime : timestamp - baseTime) / 1e3);
|
|
1366
|
+
return { x: lng, y: lat, ag: angle != null ? angle : 0, sp: speed != null ? speed : 0, tm };
|
|
1367
|
+
});
|
|
1368
|
+
};
|
|
1369
|
+
const toGCJ02TrackPoints = async (trackPoints, transform) => {
|
|
1370
|
+
const points = await transform(trackPoints.map(lnglat2point));
|
|
1371
|
+
return trackPoints.map((item, idx) => ({ ...item, lng: points[idx][0], lat: points[idx][1] }));
|
|
1372
|
+
};
|
|
1340
1373
|
const deepCompareEqualsForMaps = createComparator((deepEqual) => (a, b) => {
|
|
1341
1374
|
if (isLatLngLiteral(a) && isLatLngLiteral(b)) {
|
|
1342
|
-
|
|
1375
|
+
const result = isPlaceEqual(a, b);
|
|
1376
|
+
return result;
|
|
1343
1377
|
}
|
|
1344
1378
|
return deepEqual(a, b);
|
|
1345
1379
|
});
|
|
@@ -2126,7 +2160,8 @@ const DEFAULT_AMAP_PLUGINS = [
|
|
|
2126
2160
|
"AMap.Geocoder",
|
|
2127
2161
|
"AMap.PlaceSearch",
|
|
2128
2162
|
"AMap.Driving",
|
|
2129
|
-
"AMap.Walking"
|
|
2163
|
+
"AMap.Walking",
|
|
2164
|
+
"AMap.GraspRoad"
|
|
2130
2165
|
];
|
|
2131
2166
|
const DEFAULT_GMAP_LIBRARIES = ["marker", "places", "geometry"];
|
|
2132
2167
|
var Status = /* @__PURE__ */ ((Status2) => {
|
|
@@ -3960,16 +3995,15 @@ class SingleGeoWatch {
|
|
|
3960
3995
|
}
|
|
3961
3996
|
const useAmapGCJ02 = () => {
|
|
3962
3997
|
const { readyPromise } = useMapSupplier();
|
|
3963
|
-
async function
|
|
3998
|
+
async function toGcj02Points(points) {
|
|
3964
3999
|
await readyPromise;
|
|
3965
4000
|
return new Promise((resolve, reject) => {
|
|
3966
4001
|
AMap.convertFrom(
|
|
3967
|
-
|
|
4002
|
+
points,
|
|
3968
4003
|
"gps",
|
|
3969
4004
|
(_, result) => {
|
|
3970
4005
|
if (result.info === "ok") {
|
|
3971
|
-
|
|
3972
|
-
resolve([lng, lat]);
|
|
4006
|
+
resolve(result.locations.map(lnglat2point));
|
|
3973
4007
|
} else {
|
|
3974
4008
|
reject();
|
|
3975
4009
|
}
|
|
@@ -3977,11 +4011,15 @@ const useAmapGCJ02 = () => {
|
|
|
3977
4011
|
);
|
|
3978
4012
|
});
|
|
3979
4013
|
}
|
|
3980
|
-
|
|
4014
|
+
function toGcj02(point) {
|
|
4015
|
+
return toGcj02Points([point]).then(([result]) => result);
|
|
4016
|
+
}
|
|
4017
|
+
return { toGcj02, toGcj02Points };
|
|
3981
4018
|
};
|
|
3982
4019
|
const useGmapGCJ02 = () => {
|
|
3983
4020
|
const toGcj02 = async (point) => point;
|
|
3984
|
-
|
|
4021
|
+
const toGcj02Points = async (points) => points;
|
|
4022
|
+
return { toGcj02, toGcj02Points };
|
|
3985
4023
|
};
|
|
3986
4024
|
const useMapGCJ02 = () => {
|
|
3987
4025
|
const { supplier } = useMapSupplier();
|
|
@@ -6924,8 +6962,7 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6924
6962
|
const {
|
|
6925
6963
|
geoLoadingTitle: geoLoadingTitle2,
|
|
6926
6964
|
recomendDescription,
|
|
6927
|
-
unavailableTitle
|
|
6928
|
-
disableLocator
|
|
6965
|
+
unavailableTitle
|
|
6929
6966
|
} = props;
|
|
6930
6967
|
const title = geoLoading.value ? geoLoadingTitle2 : !availableRef.value ? unavailableTitle : centerPlace.displayName;
|
|
6931
6968
|
const description = !availableRef.value ? void 0 : isElectedRef.value ? recomendDescription : void 0;
|
|
@@ -6963,14 +7000,14 @@ const BusinessRecomendPlaceMap = defineLagecySetup(function BusinessRecomendPlac
|
|
|
6963
7000
|
"title": title,
|
|
6964
7001
|
"description": description,
|
|
6965
7002
|
"type": isDragging.value ? "locator" : "box",
|
|
6966
|
-
"withArrow":
|
|
7003
|
+
"withArrow": true
|
|
6967
7004
|
},
|
|
6968
7005
|
"on": {
|
|
6969
|
-
"click": () =>
|
|
7006
|
+
"click": () => emit("clickLocator")
|
|
6970
7007
|
}
|
|
6971
7008
|
})]);
|
|
6972
7009
|
};
|
|
6973
|
-
}).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "
|
|
7010
|
+
}).props(["log", "geoLoadingTitle", "unavailableTitle", "recomendDescription", "fallback", "geoDefaultPosition", "getRecomendPlace", "getDefaultCenterPlace", "loading", "mapContext"]);
|
|
6974
7011
|
const emptyPlace = {
|
|
6975
7012
|
lng: 0,
|
|
6976
7013
|
lat: 0,
|
|
@@ -6984,7 +7021,6 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
6984
7021
|
const {
|
|
6985
7022
|
getRecomendPlace,
|
|
6986
7023
|
mapContext,
|
|
6987
|
-
disableLocator,
|
|
6988
7024
|
defaultPlace = {
|
|
6989
7025
|
...emptyPlace
|
|
6990
7026
|
}
|
|
@@ -7191,15 +7227,11 @@ const BusinessReselectPlaceMap = defineLagecySetup(function BusinessReselectPlac
|
|
|
7191
7227
|
"attrs": {
|
|
7192
7228
|
"title": title,
|
|
7193
7229
|
"description": description,
|
|
7194
|
-
"type": isDragging.value ? "locator" : "box"
|
|
7195
|
-
"withArrow": !disableLocator
|
|
7196
|
-
},
|
|
7197
|
-
"on": {
|
|
7198
|
-
"click": () => disableLocator ? null : emit("clickLocator")
|
|
7230
|
+
"type": isDragging.value ? "locator" : "box"
|
|
7199
7231
|
}
|
|
7200
7232
|
})]);
|
|
7201
7233
|
};
|
|
7202
|
-
}).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "
|
|
7234
|
+
}).props(["loading", "fallback", "log", "defaultPlace", "unavailableTitle", "recomendDescription", "getRecomendPlace", "mapContext"]);
|
|
7203
7235
|
const imgTaxicar = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iNDQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxkZWZzPjxwYXRoIGQ9Ik0zNC4wODcgMTAuOTZjMCAyLjM2OS0uMDU0IDIuOTgtLjc4MiAzLjcwNC0uNzkzLjc5LTUuMjM2LjgzMy01LjIzNi44MzNsLTQuMTE2LjE5Mi05Ljg5Ni0uMTQ0cy03Ljc5LS4wMjYtOS4xMzEtLjAyNmMtMS4zNDIgMC0yLjQwNi0uODQ3LTIuNDA2LS44NDdDLjE0IDEyLjkzMiAwIDExLjA5IDAgMTEuMDlWNS44NnMuMTQtMS44NDIgMi41Mi0zLjU4M2MwIDAgMS4wNjQtLjg0NiAyLjQwNi0u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0xLjg0NyAwLTMuMjg5LS4yNS00Ljc1LS41MTF2LS4wMDhjLjAzLS4xMzEuMDU1LS4yMzMuMDYtLjI5LjIxOC0xLjc0NC4zOC0yLjE3My4yMzMtNS4wNTN6IiBmaWxsPSIjRjJGQUZGIi8+PHBhdGggZD0iTTEyLjA2NyAxOS43MTZsLTQuNjQ1LjY5MmMtLjQzMS0yLjkyLS44MzItNC4zNi0xLjIwMi00LjMyNGwtLjIxLTEuMjk3YTExLjczMiAxMS43MzIgMCAwMTYuMDI2LTEuNjczYy4zODYgMC0uMTM3LjA1LTEuNTY5LjE0N2wxLjYgNi40NTV6IiBmaWxsPSIjMTYxNjE2Ii8+PC9nPjwvZz48L3N2Zz4=";
|
|
7204
7236
|
const TaxiCar_css_ts_vanilla = "";
|
|
7205
7237
|
var carIcon = "_65j3sr1";
|
|
@@ -7210,9 +7242,9 @@ var pointSingleInfoBox = "_4a4ovk2";
|
|
|
7210
7242
|
var taxiCarTitle = "_65j3sr4";
|
|
7211
7243
|
const ATaxiCar = defineSetup(function ATaxiCar2(props) {
|
|
7212
7244
|
const contentRef = computed(() => {
|
|
7213
|
-
var _a;
|
|
7245
|
+
var _a, _b;
|
|
7214
7246
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
7215
|
-
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg)`;
|
|
7247
|
+
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
7216
7248
|
if (!props.title)
|
|
7217
7249
|
return {
|
|
7218
7250
|
img: `<img class="ATaxiCar ${carIcon}" src="${imgTaxicar}" style="${carStyle}">`
|
|
@@ -7254,9 +7286,9 @@ const ATaxiCar = defineSetup(function ATaxiCar2(props) {
|
|
|
7254
7286
|
});
|
|
7255
7287
|
const GTaxiCar = defineSetup(function GTaxiCar2(props) {
|
|
7256
7288
|
const contentRef = computed(() => {
|
|
7257
|
-
var _a;
|
|
7289
|
+
var _a, _b;
|
|
7258
7290
|
const titleRow = !props.title ? "" : decodeAsterisk(props.title).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize}">${item.value}</span>`).join("");
|
|
7259
|
-
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg)`;
|
|
7291
|
+
const carStyle = `transform:rotate(${(_a = props.angle) != null ? _a : 0}deg); opacity: ${(_b = props.opacity) != null ? _b : 1}`;
|
|
7260
7292
|
if (!props.title)
|
|
7261
7293
|
return {
|
|
7262
7294
|
img: createDom("img", {
|
|
@@ -7543,8 +7575,8 @@ const WaveCircle = defineSetup(function WaveCircle2(props) {
|
|
|
7543
7575
|
});
|
|
7544
7576
|
const PASSENGER_DISTANCE_MAX = 2e3;
|
|
7545
7577
|
const PASSENGER_DISTANCE_MIN = 10;
|
|
7546
|
-
const CAR_DISTANCE_MIN = 100;
|
|
7547
|
-
const AUTO_FIT_VIEW_INTERVAL = 15e3;
|
|
7578
|
+
const CAR_DISTANCE_MIN = IS_ENABLE_AUXILIARY_GRASP_ROAD ? 0 : 100;
|
|
7579
|
+
const AUTO_FIT_VIEW_INTERVAL = IS_ENABLE_AUXILIARY_GRASP_ROAD ? 24 * 3600 * 1e3 : 15e3;
|
|
7548
7580
|
const carDurationWithinMinDistance = (distance) => Math.floor(distance / 5);
|
|
7549
7581
|
const SectionDispatching = defineSetup(function SectionDispatching2(props) {
|
|
7550
7582
|
return () => {
|
|
@@ -8166,6 +8198,228 @@ const BusinessTaxiEndMap = defineSetup(function BusinessTaxiEndMap2(props) {
|
|
|
8166
8198
|
})]);
|
|
8167
8199
|
};
|
|
8168
8200
|
});
|
|
8201
|
+
const AAuxiliaryLine = defineSetup(function AAuxiliaryLine2(props) {
|
|
8202
|
+
return () => {
|
|
8203
|
+
const {
|
|
8204
|
+
type: type2 = "dashed",
|
|
8205
|
+
color = "red",
|
|
8206
|
+
showDir = false,
|
|
8207
|
+
path,
|
|
8208
|
+
opacity = 1
|
|
8209
|
+
} = props;
|
|
8210
|
+
if (color === "yellow")
|
|
8211
|
+
console.log("color, path = ", color, path);
|
|
8212
|
+
const vw = window.innerWidth * 0.01;
|
|
8213
|
+
const strokeWidth = 1 * vw;
|
|
8214
|
+
const dashLength = 0.3 * vw;
|
|
8215
|
+
if (path.length < 2)
|
|
8216
|
+
return;
|
|
8217
|
+
switch (type2) {
|
|
8218
|
+
case "solid":
|
|
8219
|
+
return h(AmapPolyline, {
|
|
8220
|
+
"attrs": {
|
|
8221
|
+
"path": path,
|
|
8222
|
+
"strokeWeight": strokeWidth,
|
|
8223
|
+
"strokeOpacity": opacity,
|
|
8224
|
+
"strokeColor": color,
|
|
8225
|
+
"lineJoin": "round",
|
|
8226
|
+
"lineCap": "round",
|
|
8227
|
+
"showDir": showDir,
|
|
8228
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8229
|
+
}
|
|
8230
|
+
});
|
|
8231
|
+
case "dashed":
|
|
8232
|
+
return h(AmapPolyline, {
|
|
8233
|
+
"attrs": {
|
|
8234
|
+
"path": path,
|
|
8235
|
+
"strokeWeight": strokeWidth,
|
|
8236
|
+
"strokeOpacity": opacity,
|
|
8237
|
+
"strokeColor": color,
|
|
8238
|
+
"lineJoin": "round",
|
|
8239
|
+
"lineCap": "round",
|
|
8240
|
+
"strokeStyle": "dashed",
|
|
8241
|
+
"strokeDasharray": [dashLength, dashLength],
|
|
8242
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8243
|
+
}
|
|
8244
|
+
});
|
|
8245
|
+
case "marker": {
|
|
8246
|
+
const noneRepeatPath = Object.values(Object.fromEntries(path.map((p) => [`${p[0]}|${p[1]}`, p])));
|
|
8247
|
+
const points = noneRepeatPath.map((point) => h(AmapMarker, {
|
|
8248
|
+
"attrs": {
|
|
8249
|
+
"position": point
|
|
8250
|
+
}
|
|
8251
|
+
}));
|
|
8252
|
+
return h("div", [points]);
|
|
8253
|
+
}
|
|
8254
|
+
}
|
|
8255
|
+
};
|
|
8256
|
+
});
|
|
8257
|
+
const GAuxiliaryLine = defineSetup(function GAuxiliaryLine2(props) {
|
|
8258
|
+
const pathRef = computed(() => props.path.map(vec2lnglat));
|
|
8259
|
+
return () => {
|
|
8260
|
+
const {
|
|
8261
|
+
type: type2 = "dashed",
|
|
8262
|
+
color = "red",
|
|
8263
|
+
opacity = 1
|
|
8264
|
+
} = props;
|
|
8265
|
+
const vw = window.innerWidth * 0.01;
|
|
8266
|
+
const strokeWidth = 1.25 * vw * 0.65;
|
|
8267
|
+
if (pathRef.value.length < 2)
|
|
8268
|
+
return;
|
|
8269
|
+
switch (type2) {
|
|
8270
|
+
case "solid":
|
|
8271
|
+
return h(GmapPolyline, {
|
|
8272
|
+
"attrs": {
|
|
8273
|
+
"path": pathRef.value,
|
|
8274
|
+
"strokeWeight": strokeWidth,
|
|
8275
|
+
"strokeOpacity": opacity,
|
|
8276
|
+
"strokeColor": color,
|
|
8277
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8278
|
+
}
|
|
8279
|
+
});
|
|
8280
|
+
case "dashed":
|
|
8281
|
+
return h(GmapPolyline, {
|
|
8282
|
+
"attrs": {
|
|
8283
|
+
"path": pathRef.value,
|
|
8284
|
+
"icons": [{
|
|
8285
|
+
icon: {
|
|
8286
|
+
path: `M 0,-0.5 0,0.5`,
|
|
8287
|
+
strokeWeight: strokeWidth,
|
|
8288
|
+
strokeColor: color,
|
|
8289
|
+
strokeOpacity: opacity,
|
|
8290
|
+
fillColor: color,
|
|
8291
|
+
scale: 1
|
|
8292
|
+
},
|
|
8293
|
+
repeat: `${strokeWidth}px`,
|
|
8294
|
+
offset: `${strokeWidth / 2}px`
|
|
8295
|
+
}],
|
|
8296
|
+
"zIndex": ZINDEX_AUXILIARY_GRASP
|
|
8297
|
+
}
|
|
8298
|
+
});
|
|
8299
|
+
case "marker": {
|
|
8300
|
+
const noneRepeatPath = Object.values(Object.fromEntries(pathRef.value.map((p) => [`${p.lng}|${p.lat}`, p])));
|
|
8301
|
+
const points = noneRepeatPath.map((point) => h(GmapAdvancedMarkerView, {
|
|
8302
|
+
"attrs": {
|
|
8303
|
+
"position": point
|
|
8304
|
+
}
|
|
8305
|
+
}));
|
|
8306
|
+
return h("div", [points]);
|
|
8307
|
+
}
|
|
8308
|
+
}
|
|
8309
|
+
};
|
|
8310
|
+
});
|
|
8311
|
+
const AuxiliaryLine = defineSetup(function AuxiliaryLine2(props) {
|
|
8312
|
+
const payload = useMapSupplier();
|
|
8313
|
+
return () => {
|
|
8314
|
+
if (!props.path.length)
|
|
8315
|
+
return null;
|
|
8316
|
+
return createElement(payload.supplier === "gmap" ? GAuxiliaryLine : AAuxiliaryLine, {
|
|
8317
|
+
attrs: props
|
|
8318
|
+
});
|
|
8319
|
+
};
|
|
8320
|
+
});
|
|
8321
|
+
const useAmapGraspRoad = (props) => {
|
|
8322
|
+
const amapGraspRoad = new AMap.GraspRoad();
|
|
8323
|
+
const pathRef = ref([]);
|
|
8324
|
+
watchEffectForDeepOption(
|
|
8325
|
+
() => [...props.tracks],
|
|
8326
|
+
(tracks) => {
|
|
8327
|
+
if (tracks.length < 2) {
|
|
8328
|
+
pathRef.value = tracks.map(lnglat2point);
|
|
8329
|
+
return;
|
|
8330
|
+
}
|
|
8331
|
+
const graspRoadPoints = trackPoints2amapGraspRoadPoints(tracks);
|
|
8332
|
+
amapGraspRoad.driving(graspRoadPoints, (error, result) => {
|
|
8333
|
+
if (error) {
|
|
8334
|
+
console.error(error);
|
|
8335
|
+
pathRef.value = tracks.map(lnglat2point);
|
|
8336
|
+
return;
|
|
8337
|
+
}
|
|
8338
|
+
pathRef.value = result.data.points.map(({ x, y }) => [x, y]);
|
|
8339
|
+
});
|
|
8340
|
+
}
|
|
8341
|
+
);
|
|
8342
|
+
return pathRef;
|
|
8343
|
+
};
|
|
8344
|
+
const useGmapGraspRoad = (props) => {
|
|
8345
|
+
const path = props.tracks.map(({ lng, lat }) => [lng, lat]);
|
|
8346
|
+
return ref(path);
|
|
8347
|
+
};
|
|
8348
|
+
const useMapGraspRoad = (props) => {
|
|
8349
|
+
const { supplier } = useMapSupplier();
|
|
8350
|
+
return supplier === "gmap" ? useGmapGraspRoad(props) : useAmapGraspRoad(props);
|
|
8351
|
+
};
|
|
8352
|
+
const GraspRoad = defineSetup(function GraspRoad2(props, {
|
|
8353
|
+
slots
|
|
8354
|
+
}) {
|
|
8355
|
+
const pathRef = useMapGraspRoad(props);
|
|
8356
|
+
const renderProps = reactive({
|
|
8357
|
+
path: pathRef
|
|
8358
|
+
});
|
|
8359
|
+
return () => {
|
|
8360
|
+
var _a;
|
|
8361
|
+
return h("div", [(_a = slots.render) == null ? void 0 : _a.call(slots, renderProps)]);
|
|
8362
|
+
};
|
|
8363
|
+
});
|
|
8364
|
+
const AuxiliaryGraspRoad = defineSetup(function AuxiliaryGraspRoad2(props) {
|
|
8365
|
+
return () => {
|
|
8366
|
+
const {
|
|
8367
|
+
trackPoints,
|
|
8368
|
+
status,
|
|
8369
|
+
to,
|
|
8370
|
+
from
|
|
8371
|
+
} = props;
|
|
8372
|
+
console.log("trackPoints.length = ", trackPoints.length);
|
|
8373
|
+
if (status !== "inService" && status !== "driverStartService" && status !== "dispatched" && status !== "book-driverStartService")
|
|
8374
|
+
return;
|
|
8375
|
+
const distination = status === "dispatched" || status === "driverStartService" ? from : to;
|
|
8376
|
+
if (!distination)
|
|
8377
|
+
return;
|
|
8378
|
+
return h("div", [h(AuxiliaryLine, {
|
|
8379
|
+
"attrs": {
|
|
8380
|
+
"path": trackPoints.map(lnglat2point),
|
|
8381
|
+
"type": "marker"
|
|
8382
|
+
}
|
|
8383
|
+
}), h(GraspRoad, {
|
|
8384
|
+
"attrs": {
|
|
8385
|
+
"tracks": trackPoints,
|
|
8386
|
+
"render": ({
|
|
8387
|
+
path
|
|
8388
|
+
}) => {
|
|
8389
|
+
const adjustedPosition = path[path.length - 1];
|
|
8390
|
+
return [h(AuxiliaryLine, {
|
|
8391
|
+
"attrs": {
|
|
8392
|
+
"path": path,
|
|
8393
|
+
"color": "black"
|
|
8394
|
+
}
|
|
8395
|
+
}), !!adjustedPosition && h(DrivingRoute, {
|
|
8396
|
+
"attrs": {
|
|
8397
|
+
"from": adjustedPosition,
|
|
8398
|
+
"to": lnglat2point(distination),
|
|
8399
|
+
"render": ({
|
|
8400
|
+
path: path2,
|
|
8401
|
+
angle
|
|
8402
|
+
}) => [h(AuxiliaryLine, {
|
|
8403
|
+
"attrs": {
|
|
8404
|
+
"path": path2,
|
|
8405
|
+
"type": "solid",
|
|
8406
|
+
"showDir": true,
|
|
8407
|
+
"opacity": 0.4
|
|
8408
|
+
}
|
|
8409
|
+
}), h(TaxiCar, {
|
|
8410
|
+
"attrs": {
|
|
8411
|
+
"position": path2[0],
|
|
8412
|
+
"angle": angle,
|
|
8413
|
+
"opacity": 0.7
|
|
8414
|
+
}
|
|
8415
|
+
})]
|
|
8416
|
+
}
|
|
8417
|
+
})];
|
|
8418
|
+
}
|
|
8419
|
+
}
|
|
8420
|
+
})]);
|
|
8421
|
+
};
|
|
8422
|
+
});
|
|
8169
8423
|
const STATUS_NEED_CAR_POSITION = ["book-driverStartService", "dispatched", "driverStartService", "inService", "driverArrived"];
|
|
8170
8424
|
const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap2(props) {
|
|
8171
8425
|
const {
|
|
@@ -8173,10 +8427,14 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
8173
8427
|
registerOverlay,
|
|
8174
8428
|
mapRef: outerSetMap,
|
|
8175
8429
|
getDriverPosition,
|
|
8430
|
+
getDriverPositionTrack,
|
|
8176
8431
|
renderStartSerivceTitle,
|
|
8177
8432
|
renderInServiceTitle
|
|
8178
8433
|
} = props;
|
|
8179
8434
|
const deferedSetFitView = pipeDefer(registerOverlay.setFitView);
|
|
8435
|
+
const {
|
|
8436
|
+
toGcj02Points
|
|
8437
|
+
} = useMapGCJ02();
|
|
8180
8438
|
const {
|
|
8181
8439
|
setMap,
|
|
8182
8440
|
mapElementRef
|
|
@@ -8192,19 +8450,27 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
8192
8450
|
});
|
|
8193
8451
|
const carPositionRef = ref();
|
|
8194
8452
|
const carAngleRef = ref();
|
|
8453
|
+
const carTrackPositionsRef = ref([]);
|
|
8195
8454
|
watch(() => props.driverStatus, (status, _, onCleanup) => {
|
|
8196
8455
|
if (!STATUS_NEED_CAR_POSITION.includes(status))
|
|
8197
8456
|
return;
|
|
8198
|
-
const update = () => {
|
|
8199
|
-
|
|
8457
|
+
const update = async () => {
|
|
8458
|
+
const [{
|
|
8200
8459
|
position,
|
|
8201
8460
|
angle
|
|
8202
|
-
})
|
|
8461
|
+
}, tracks] = await Promise.all([getDriverPosition(), IS_ENABLE_AUXILIARY_GRASP_ROAD ? getDriverPositionTrack == null ? void 0 : getDriverPositionTrack() : []]);
|
|
8462
|
+
if (IS_ENABLE_AUXILIARY_GRASP_ROAD) {
|
|
8463
|
+
const trackPositions = await toGCJ02TrackPoints(toTrackPoints(tracks), toGcj02Points);
|
|
8464
|
+
carPositionRef.value = lnglat2point(trackPositions[trackPositions.length - 1]);
|
|
8465
|
+
carAngleRef.value = angle;
|
|
8466
|
+
carTrackPositionsRef.value = trackPositions;
|
|
8467
|
+
} else {
|
|
8203
8468
|
assertPoint(position);
|
|
8204
8469
|
assertAngle(angle);
|
|
8205
8470
|
carPositionRef.value = position != null ? position : void 0;
|
|
8206
8471
|
carAngleRef.value = angle;
|
|
8207
|
-
|
|
8472
|
+
carTrackPositionsRef.value = toTrackPoints(tracks);
|
|
8473
|
+
}
|
|
8208
8474
|
};
|
|
8209
8475
|
const timer = setInterval(update, interval);
|
|
8210
8476
|
update();
|
|
@@ -8315,9 +8581,16 @@ const BusinessTaxiServiceMap = defineLagecySetup(function BusinessTaxiServiceMap
|
|
|
8315
8581
|
"registerOverlay": registerOverlay
|
|
8316
8582
|
}
|
|
8317
8583
|
})
|
|
8318
|
-
)
|
|
8584
|
+
), IS_ENABLE_AUXILIARY_GRASP_ROAD && h(AuxiliaryGraspRoad, {
|
|
8585
|
+
"attrs": {
|
|
8586
|
+
"status": driverStatus,
|
|
8587
|
+
"trackPoints": carTrackPositionsRef.value,
|
|
8588
|
+
"from": from,
|
|
8589
|
+
"to": to
|
|
8590
|
+
}
|
|
8591
|
+
})]);
|
|
8319
8592
|
};
|
|
8320
|
-
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
8593
|
+
}).props(["bookDispatchingTitle", "dispatchingTitle", "driverArrivedTitle", "driverStatus", "fallback", "from", "getDriverPosition", "getDriverPositionTrack", "interval", "loading", "mapRef", "renderInServiceTitle", "renderStartSerivceTitle", "to", "registerOverlay"]);
|
|
8321
8594
|
const useBusinessAlarm = (props) => {
|
|
8322
8595
|
const emptyPlaceName = props == null ? void 0 : props.emptyPlaceName;
|
|
8323
8596
|
const { geoPosition, geoError } = useGeoLocation({
|
|
@@ -9,5 +9,7 @@ export declare const ZINDEX_START_END_LOGO_LAYER = 40;
|
|
|
9
9
|
export declare const ZINDEX_PLACE_LAYER = 30;
|
|
10
10
|
export declare const ZINDEX_CAR_LAYER = 21;
|
|
11
11
|
export declare const ZINDEX_PASSENGER_LAYER = 20;
|
|
12
|
+
export declare const ZINDEX_AUXILIARY_GRASP = 14;
|
|
12
13
|
export declare const ZINDEX_LINE_LAYER = 12;
|
|
13
14
|
export declare const ZINDEX_GREEN_ZONE = 10;
|
|
15
|
+
export declare const IS_ENABLE_AUXILIARY_GRASP_ROAD: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DriverStatus, Place, TrackPoint } from "../../types/interface";
|
|
2
|
+
export interface AuxiliaryGraspRoadProps {
|
|
3
|
+
status: DriverStatus;
|
|
4
|
+
trackPoints: TrackPoint[];
|
|
5
|
+
from: Place;
|
|
6
|
+
to: Place;
|
|
7
|
+
}
|
|
8
|
+
export declare const AuxiliaryGraspRoad: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AuxiliaryGraspRoadProps>, 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<AuxiliaryGraspRoadProps, Required<AuxiliaryGraspRoadProps>>, never, AuxiliaryGraspRoadProps, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AuxiliaryGraspRoad";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface AuxiliaryLineProps {
|
|
2
|
+
color?: AMap.LineSharedOptions["strokeColor"];
|
|
3
|
+
type?: AMap.LineSharedOptions["strokeStyle"] | "marker";
|
|
4
|
+
opacity?: number;
|
|
5
|
+
showDir?: boolean;
|
|
6
|
+
path: [number, number][];
|
|
7
|
+
}
|
|
8
|
+
export declare const AAuxiliaryLine: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AuxiliaryLineProps>, 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<AuxiliaryLineProps, Required<AuxiliaryLineProps>>, never, AuxiliaryLineProps, {}>;
|
|
9
|
+
export declare const GAuxiliaryLine: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AuxiliaryLineProps>, 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<AuxiliaryLineProps, Required<AuxiliaryLineProps>>, never, AuxiliaryLineProps, {}>;
|
|
10
|
+
export declare const AuxiliaryLine: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<AuxiliaryLineProps>, 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<AuxiliaryLineProps, Required<AuxiliaryLineProps>>, never, AuxiliaryLineProps, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AuxiliaryLine";
|
|
@@ -24,7 +24,6 @@ export interface BusinessRecomendPlaceMapProps extends Omit<HeycarMapProps, "cen
|
|
|
24
24
|
unavailableTitle: string;
|
|
25
25
|
recomendDescription: string;
|
|
26
26
|
geoDefaultPosition?: Point;
|
|
27
|
-
disableLocator?: boolean;
|
|
28
27
|
mapContext: BusinessRecomendPlaceContext;
|
|
29
28
|
getDefaultCenterPlace: () => Promise<Place | undefined>;
|
|
30
29
|
onLoadGeoLocation?: UseGeoLocationProps["onLoad"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Place } from "../../types/interface";
|
|
2
2
|
import { type BusinessRecomendPlaceMapProps } from "../BusinessRecomendPlaceMap";
|
|
3
|
-
export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "loading" | "fallback" | "log" | "getRecomendPlace" | "unavailableTitle" | "recomendDescription" | "
|
|
3
|
+
export interface BusinessReselectPlaceMapProps extends Pick<BusinessRecomendPlaceMapProps, "loading" | "fallback" | "log" | "getRecomendPlace" | "unavailableTitle" | "recomendDescription" | "mapContext" | "onChangePlace" | "onChangeRecomandPlace" | "onGeoError"> {
|
|
4
4
|
defaultPlace?: Place;
|
|
5
5
|
}
|
|
6
|
-
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "changePlace" | "changeRecomandPlace" | "geoError"
|
|
6
|
+
export declare const BusinessReselectPlaceMap: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessReselectPlaceMapProps>, 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<BusinessReselectPlaceMapProps, Required<BusinessReselectPlaceMapProps>>, "changePlace" | "changeRecomandPlace" | "geoError", BusinessReselectPlaceMapProps, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HeycarMapProps } from "../../components/MapProvider";
|
|
2
2
|
import type { MROP } from "../../hooks/useOverlay";
|
|
3
|
-
import type { DriverStatus, Place, Point } from "../../types/interface";
|
|
3
|
+
import type { DriverStatus, Place, Point, TrackPoint } from "../../types/interface";
|
|
4
4
|
export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"> & Required<MROP> & {
|
|
5
5
|
from: Place;
|
|
6
6
|
to: Place;
|
|
@@ -22,5 +22,6 @@ export type BusinessTaxiServiceMapProps = Omit<HeycarMapProps, "center" | "zoom"
|
|
|
22
22
|
position: Point;
|
|
23
23
|
angle?: number;
|
|
24
24
|
}>;
|
|
25
|
+
getDriverPositionTrack?: () => Promise<TrackPoint[]>;
|
|
25
26
|
};
|
|
26
27
|
export declare const BusinessTaxiServiceMap: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessTaxiServiceMapProps>, 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<BusinessTaxiServiceMapProps, Required<BusinessTaxiServiceMapProps>>, "resize" | "dragEnd" | "zoomEnd", BusinessTaxiServiceMapProps, {} | {}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VNodeChild } from "../../types/helper";
|
|
2
|
+
import type { Point, TrackPoint } from "../../types/interface";
|
|
3
|
+
export interface GraspRoadProps {
|
|
4
|
+
tracks: TrackPoint[];
|
|
5
|
+
render?: (props: {
|
|
6
|
+
path: Point[];
|
|
7
|
+
}) => VNodeChild;
|
|
8
|
+
}
|
|
9
|
+
export declare const GraspRoad: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<GraspRoadProps>, 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<GraspRoadProps, Required<GraspRoadProps>>, never, GraspRoadProps, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GraspRoad";
|
|
@@ -3,6 +3,7 @@ export interface TaxiCarProps<T> extends MapRegisterOverlayProps<T> {
|
|
|
3
3
|
position: [number, number];
|
|
4
4
|
angle?: number;
|
|
5
5
|
title?: string;
|
|
6
|
+
opacity?: number;
|
|
6
7
|
}
|
|
7
8
|
export declare const ATaxiCar: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<TaxiCarProps<{
|
|
8
9
|
_needUpdate: boolean;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { Point } from "../types/interface";
|
|
2
2
|
export declare const useAmapGCJ02: () => {
|
|
3
3
|
toGcj02: (point: Point) => Promise<Point>;
|
|
4
|
+
toGcj02Points: (points: Point[]) => Promise<Point[]>;
|
|
4
5
|
};
|
|
5
6
|
export declare const useGmapGCJ02: () => {
|
|
6
7
|
toGcj02: (point: Point) => Promise<Point>;
|
|
8
|
+
toGcj02Points: (points: Point[]) => Promise<Point[]>;
|
|
7
9
|
};
|
|
8
10
|
export declare const useMapGCJ02: () => {
|
|
9
11
|
toGcj02: (point: Point) => Promise<Point>;
|
|
12
|
+
toGcj02Points: (points: Point[]) => Promise<Point[]>;
|
|
10
13
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ref } from "vue-demi";
|
|
2
|
+
import type { Point, TrackPoint } from "../types/interface";
|
|
3
|
+
interface UseMapGraspRoadProps {
|
|
4
|
+
tracks: TrackPoint[];
|
|
5
|
+
}
|
|
6
|
+
export declare const useAmapGraspRoad: (props: UseMapGraspRoadProps) => Ref<Point[]>;
|
|
7
|
+
export declare const useGmapGraspRoad: (props: UseMapGraspRoadProps) => Ref<Point[]>;
|
|
8
|
+
export declare const useMapGraspRoad: (props: UseMapGraspRoadProps) => Ref<Point[]>;
|
|
9
|
+
export {};
|
|
@@ -33,4 +33,11 @@ export interface Route {
|
|
|
33
33
|
duration: number;
|
|
34
34
|
steps: RouteStep[];
|
|
35
35
|
}
|
|
36
|
+
export interface TrackPoint {
|
|
37
|
+
lng: number;
|
|
38
|
+
lat: number;
|
|
39
|
+
angle?: number;
|
|
40
|
+
speed?: number;
|
|
41
|
+
timestamp: number;
|
|
42
|
+
}
|
|
36
43
|
export type DriverStatus = "dispatching" | "book-dispatching" | "dispatched" | "driverStartService" | "book-driverStartService" | "book-dispatched" | "driverArrived" | "inService" | "canceled" | "endService" | "completed" | "canceling" | "banlanceRefund" | "waitBanlanceRefund" | "rechargePayed" | "waitRechargePay" | "payed" | "waitpay" | "refund" | "confirmed" | "assign";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Point, TrackPoint } from "../types/interface";
|
|
2
|
+
type GetDriverPositionFn = () => Promise<{
|
|
3
|
+
position: Point;
|
|
4
|
+
angle?: number;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const createMockDriverPositions: (getDriverPositionFn: GetDriverPositionFn) => {
|
|
7
|
+
wrappedGetDriverPosition: GetDriverPositionFn;
|
|
8
|
+
getDriverPositionTrack: () => TrackPoint[];
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/// <reference types="google.maps" />
|
|
2
|
-
import type { Place, Point, RecommendZonePlaces, Zone } from "../types/interface";
|
|
2
|
+
import type { Place, Point, RecommendZonePlaces, TrackPoint, Zone } from "../types/interface";
|
|
3
3
|
import type { WxGetLocationSuccessResponse } from "../types/wx";
|
|
4
4
|
export declare const vec2lnglat: ([lng, lat]: [number, number]) => google.maps.LatLngLiteral;
|
|
5
|
+
export declare const lnglat2point: ({ lng, lat }: {
|
|
6
|
+
lng: number;
|
|
7
|
+
lat: number;
|
|
8
|
+
}) => Point;
|
|
5
9
|
export interface AsteriskItem {
|
|
6
10
|
type: "normal" | "emphasize";
|
|
7
11
|
value: string;
|
|
@@ -46,5 +50,22 @@ interface MaybeRecomendZonePlaces {
|
|
|
46
50
|
places?: MaybePlace[];
|
|
47
51
|
}
|
|
48
52
|
export declare const toRecommendZonePlacesType: (maybeRecomendZonePlaces: MaybeRecomendZonePlaces) => RecommendZonePlaces;
|
|
53
|
+
interface MaybeTrackPoint {
|
|
54
|
+
lng?: number | string;
|
|
55
|
+
lat?: number | string;
|
|
56
|
+
angle?: number | string;
|
|
57
|
+
speed?: number | string;
|
|
58
|
+
timestamp?: number | string;
|
|
59
|
+
}
|
|
60
|
+
export declare const toTrackPoint: (maybeTrackPoint?: MaybeTrackPoint) => TrackPoint;
|
|
61
|
+
export declare const toTrackPoints: (maybeTrackPoints?: MaybeTrackPoint[]) => TrackPoint[];
|
|
49
62
|
export declare const wxGetLocationSuccessResponse2GeolocationPosition: (res: WxGetLocationSuccessResponse) => GeolocationPosition;
|
|
63
|
+
export declare const trackPoints2amapGraspRoadPoints: (trackPoints: TrackPoint[]) => AMap.GraspRoadOriginPath;
|
|
64
|
+
export declare const toGCJ02TrackPoints: (trackPoints: TrackPoint[], transform: (points: Point[]) => Promise<Point[]>) => Promise<{
|
|
65
|
+
lng: number;
|
|
66
|
+
lat: number;
|
|
67
|
+
angle?: number | undefined;
|
|
68
|
+
speed?: number | undefined;
|
|
69
|
+
timestamp: number;
|
|
70
|
+
}[]>;
|
|
50
71
|
export {};
|