fix: 修改智能安全帽、机械设备定位安全帽图标、起点图标、终点图标图标显示异常问题

This commit is contained in:
Vce 2024-04-11 15:43:32 +08:00
parent 033c761a92
commit 5435c8ffd5
2 changed files with 10 additions and 7 deletions

View File

@ -1015,7 +1015,8 @@ function trackMapInit(path: any, item: any) {
// icon marker
let startMarker = new AMap.Marker({
position: path[0],
icon: startPointIcon
icon: startPointIcon,
offset: new AMap.Pixel(-15, -40)
});
// icon
@ -1029,7 +1030,7 @@ function trackMapInit(path: any, item: any) {
let endMarker = new AMap.Marker({
position: path[path.length - 1],
icon: endPointIcon,
offset: new AMap.Pixel(-15, -20)
offset: new AMap.Pixel(-15, -40)
});
// markers

View File

@ -1352,7 +1352,8 @@ function trackMapInit(path: any, item: any) {
// icon marker
let startMarker = new AMap.Marker({
position: path[0],
icon: startPointIcon
icon: startPointIcon,
offset: new AMap.Pixel(-15, -40)
});
// icon
@ -1366,7 +1367,8 @@ function trackMapInit(path: any, item: any) {
let endMarker = new AMap.Marker({
position: path[path.length - 1],
icon: endPointIcon,
offset: new AMap.Pixel(-15, -20)
// offset: new AMap.Pixel(-15, -20)
offset: new AMap.Pixel(-15, -40)
});
// markers
@ -1405,10 +1407,10 @@ function trackMapInit(path: any, item: any) {
position: path[0],
// icon: "https://webapi.amap.com/images/car.png",
// icon: "src/assets/images/smartSafeHat.png", //
icon: smartSafeHat, //
icon: smartSafeHat2, //
// icon: "@/assets/images/carPosition/carIcon.png", //
// icon: "src/assets/images/carPosition/carIcon.png", //
offset: new AMap.Pixel(-26, -13),
offset: new AMap.Pixel(-14, -13),
autoRotation: true,
angle: 90
});
@ -1602,7 +1604,7 @@ function addMarker() {
//
image: "//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png",
//
imageSize: new AMap.Size(25, 34)
imageSize: new AMap.Size(25, 34),
//
// imageOffset: new AMap.Pixel(-9, -3)
});