fix: 修改智能安全帽、机械设备定位安全帽图标、起点图标、终点图标图标显示异常问题
This commit is contained in:
parent
033c761a92
commit
5435c8ffd5
@ -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 添加到地图
|
||||
|
||||
@ -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)
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user