|
|
@@ -347,14 +347,15 @@ export default {
|
|
|
for (let i of media.value) {
|
|
|
previewSrcList.value.push(i.downloadUrl);
|
|
|
}
|
|
|
- setShipMarker();
|
|
|
+ initMap(coordinates.value[0].longitude, coordinates.value[0].latitude);
|
|
|
}
|
|
|
|
|
|
- function initMap() {
|
|
|
+ function initMap(longitude = 121.524761, latitude = 31.228721) {
|
|
|
map.value = new AMap.Map("map-container", {
|
|
|
zoom: 11, //级别
|
|
|
- center: [121.524761, 31.228721], //中心点坐标
|
|
|
+ center: [longitude, latitude], //中心点坐标
|
|
|
});
|
|
|
+ setShipMarker(longitude, latitude);
|
|
|
}
|
|
|
|
|
|
function setShipMarker(longitude = 121.524761, latitude = 31.228721) {
|
|
|
@@ -477,7 +478,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- initMap();
|
|
|
getVoyageDetail();
|
|
|
});
|
|
|
return {
|