|
|
@@ -524,7 +524,7 @@ export default {
|
|
|
]);
|
|
|
that.maplist = [];
|
|
|
// 地点搜索 获取500米范围poi点
|
|
|
- getMapPoi({ latitude: this.pLat, longitude: this.pLot }).then((res) => {
|
|
|
+ getMapPoi({ latitude: val.location.lat, longitude: val.location.lng }).then((res) => {
|
|
|
console.log(res);
|
|
|
that.maplist = res.data;
|
|
|
that.marker.setGeometries([]);
|
|
|
@@ -599,14 +599,17 @@ export default {
|
|
|
console.log(this.maplist);
|
|
|
console.log(this.addresssb);
|
|
|
if (this.addresssb > -1) {
|
|
|
- this.list.addressLine = this.maplist[this.addresssb].address;
|
|
|
+ let checkedPoint = this.maplist[this.addresssb];
|
|
|
+ // 坐标转换
|
|
|
+ let TXisBD = this.CJ02BD(checkedPoint.location.lat, checkedPoint.location.lng);
|
|
|
+ this.list.addressLine = checkedPoint.address;
|
|
|
this.lon = this.myLat;
|
|
|
this.lat = this.myLon;
|
|
|
- this.poiAddress = this.maplist[this.addresssb].address;
|
|
|
- this.poiLat = this.maplist[this.addresssb].location.lat;
|
|
|
- this.poiLon = this.maplist[this.addresssb].location.lng;
|
|
|
- this.poiId = this.maplist[this.addresssb].id;
|
|
|
- this.poiName = this.maplist[this.addresssb].title;
|
|
|
+ this.poiAddress = checkedPoint.address;
|
|
|
+ this.poiLat = TXisBD.lat;
|
|
|
+ this.poiLon = TXisBD.lon;
|
|
|
+ this.poiId = checkedPoint.id;
|
|
|
+ this.poiName = checkedPoint.title;
|
|
|
this.showmap = false;
|
|
|
}
|
|
|
},
|
|
|
@@ -807,6 +810,13 @@ export default {
|
|
|
map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.SCALE); //移除比例尺控件
|
|
|
map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ROTATION); //移除旋转控件
|
|
|
map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ZOOM); //移除控件缩放
|
|
|
+ this.map.on("click", this.clickMap);
|
|
|
+ },
|
|
|
+ // 点击事件处理方法
|
|
|
+ clickMap(evt) {
|
|
|
+ var lat = evt.latLng.getLat().toFixed(6);
|
|
|
+ var lng = evt.latLng.getLng().toFixed(6);
|
|
|
+ console.log(evt);
|
|
|
},
|
|
|
initMap(map) {
|
|
|
// 监听地图平移开始
|
|
|
@@ -1174,7 +1184,8 @@ export default {
|
|
|
valid({ storeId: that.list.storeId }).then((res) => {
|
|
|
loading1.clear();
|
|
|
if (res.code == 200) {
|
|
|
- window.location.replace(window.location.origin + "/mobile/storeAddress");
|
|
|
+ that.$router.go(-1);
|
|
|
+ // window.location.replace(window.location.origin + "/mobile/storeAddress");
|
|
|
}
|
|
|
});
|
|
|
});
|