story#7074,地图搜索位置改动为后台接口

This commit is contained in:
2025-08-20 17:53:07 +08:00
parent 2c94eee160
commit 1abb7ac605
3 changed files with 32 additions and 7 deletions

View File

@ -75,13 +75,14 @@
}
let content = '<div class="dest-position"></div>';
let activeObj = this.addressList[this.activeIndex];
let lanLat = activeObj.location.split(',');
this.marker = new AMap.Marker({
position: new AMap.LngLat( activeObj.location.lng, activeObj.location.lat ),
position: new AMap.LngLat( lanLat[0], lanLat[1] ),
content: content,
offset: new AMap.Pixel(-13, -30)
});
this.map.add(this.marker)
this.map.setCenter([activeObj.location.lng, activeObj.location.lat])
this.map.setCenter([lanLat[0], lanLat[1]])
},
successHandler() {
if( this.activeIndex == null ) {
@ -89,10 +90,11 @@
return
}
let activeObj = this.addressList[this.activeIndex];
let lanLat = activeObj.location.split(',');
let _tempObj = {
startPoiAddress: activeObj?.district + activeObj?.address + activeObj?.name,
startLat: activeObj?.location?.lat,
startLng: activeObj?.location?.lng,
startLat: lanLat[0],
startLng: lanLat[1],
adCode: activeObj?.adcode,
}
sessionStorage.setItem('reportAddress', JSON.stringify(_tempObj))