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