修改地图坐标

This commit is contained in:
978184212@qq.com 2026-08-06 10:53:24 +08:00
parent d4636bc3f3
commit f2ac51e844
1 changed files with 22 additions and 11 deletions

View File

@ -685,11 +685,11 @@ export default {
const marker = new AMap.Marker({
position: [lng, lat],
icon: new AMap.Icon({
size: new AMap.Size(30, 42),
image: 'https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png',
imageSize: new AMap.Size(30, 42)
size: new AMap.Size(30, 30),
image: require('@/assets/image/vehicle.png'),
imageSize: new AMap.Size(30, 30)
}),
offset: new AMap.Pixel(-15, -42),
offset: new AMap.Pixel(-15, -30),
zIndex: 1002,
extData: { vehicleInfo: item }
});
@ -874,11 +874,11 @@ export default {
const locationMarker = new AMap.Marker({
position: [lng, lat],
icon: new AMap.Icon({
size: new AMap.Size(30, 42),
image: 'https://webapi.amap.com/theme/v1.3/markers/n/mark_r.png',
imageSize: new AMap.Size(30, 42)
size: new AMap.Size(30, 30),
image: require('@/assets/image/vehicle.png'),
imageSize: new AMap.Size(30, 30)
}),
offset: new AMap.Pixel(-15, -42),
offset: new AMap.Pixel(-15, -30),
zIndex: 1002,
extData: { point: point, vehicleInfo: vehicleInfo }
});
@ -1219,11 +1219,22 @@ export default {
if (b.type!='soil') return -1;
return 0;
});
console.log(Marker,'Marker')
Marker.map(item => {
let iconUrl;
if (item.type == 'vehicle' || item.type == 'waste_vehicle') {
// 使
icon = new AMap.Icon({
size: new AMap.Size(30, 30), //
image: require('@/assets/image/vehicle.png'),
imageSize: new AMap.Size(30, 30) //
});
} else {
// 使
iconUrl = this.urlimg + item.picUrl;
}
let marker = new AMap.Marker({
zIndex: item.type == 'soil' ? that.lastZIndex : (that.lastZIndex+1),
icon: this.urlimg + item.picUrl,
icon: iconUrl,
position: [item.longitude, item.latitude],
offset: new AMap.Pixel(item.width, item.height),
title: item.name,
@ -2151,7 +2162,7 @@ a:hover {
.vehicle-dropdown-item-dark {
display: flex;
align-items: center;
padding: 8px 16px;
padding: 8px 16px!important;
color: #8bb4d0;
font-size: 13px;
cursor: pointer;