|
|
@@ -301,16 +301,20 @@ export default {
|
|
|
for (let i of medias.value) {
|
|
|
previewSrcList.value.push(i.downloadUrl);
|
|
|
}
|
|
|
- setShipMarker();
|
|
|
+ initMap();
|
|
|
}
|
|
|
function initMap() {
|
|
|
map.value = new AMap.Map("map-container", {
|
|
|
zoom: 11, //级别
|
|
|
center: [121.524761, 31.228721], //中心点坐标
|
|
|
});
|
|
|
+ let { longitude, latitude } =
|
|
|
+ coordinates.value[coordinates.value.length - 1];
|
|
|
+ setShipMarker(longitude, latitude);
|
|
|
}
|
|
|
|
|
|
function setShipMarker(longitude = 121.524761, latitude = 31.228721) {
|
|
|
+ map.value.setCenter([longitude, latitude]);
|
|
|
var marker = new AMap.Marker({
|
|
|
position: new AMap.LngLat(longitude, latitude),
|
|
|
// offset: new AMap.Pixel(-10, -10),
|
|
|
@@ -320,6 +324,7 @@ export default {
|
|
|
});
|
|
|
map.value.add(marker);
|
|
|
}
|
|
|
+
|
|
|
let disabledStatus = ref(true);
|
|
|
let updateCache = {};
|
|
|
function changeVoyageInfo() {
|
|
|
@@ -416,7 +421,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- initMap();
|
|
|
getVoyageDetail();
|
|
|
});
|
|
|
return {
|