|
@@ -61,6 +61,7 @@
|
|
|
address: '请选择集合地点'
|
|
|
},
|
|
|
controls: [], // 地图中心点图标, 可更换iconPath, 详情见官方文档关于map组件的介绍
|
|
|
+ lonlatData:''
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -116,6 +117,10 @@
|
|
|
|
|
|
// 地图选择位置后 查询地点名称
|
|
|
async checkMap(res) {
|
|
|
+ let point = new plus.maps.Point(res.longitude,res.latitude);
|
|
|
+ plus.maps.Map.convertCoordinates(point, {},event=> {
|
|
|
+ this.lonlatData= event.coord; // 转换后的坐标值
|
|
|
+ });
|
|
|
this.addressObj = Object.assign({}, this.addressObj, {
|
|
|
longitude: res.longitude,
|
|
|
latitude: res.latitude,
|
|
@@ -194,6 +199,8 @@
|
|
|
},
|
|
|
// 提交
|
|
|
submitAdress() {
|
|
|
+ this.addressObj.longitude=this.lonlatData.longitude
|
|
|
+ this.addressObj.latitude=this.lonlatData.latitude
|
|
|
this.controls = []
|
|
|
setTimeout(() => {
|
|
|
this.$emit('updateAddress', this.addressObj)
|