邓洁 : 地图接口
This commit is contained in:
@@ -76,7 +76,42 @@
|
||||
console.log("markerClusterCreate", e);
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.getMapList()
|
||||
},
|
||||
methods: {
|
||||
getMapList() {
|
||||
const realData = {
|
||||
longitude: uni.getStorageSync('longitude'),
|
||||
latitude: uni.getStorageSync('latitude'),
|
||||
radius: 100
|
||||
}
|
||||
const mockData = {
|
||||
longitude: 23.40,
|
||||
latitude: 116.38,
|
||||
radius: 1111111111
|
||||
}
|
||||
this.$api.getMap(mockData).then(res => {
|
||||
console.log('getMap', res);
|
||||
let obj = {}
|
||||
if (res.statusCode === 200) {
|
||||
// res.data.data.forEach(item => {
|
||||
// obj = {
|
||||
// id: parseInt(item.id),
|
||||
// latitude: item.lat,
|
||||
// longitude: item.lng,
|
||||
// // iconPath: '../../../static/map/sp_icon_dw.png',
|
||||
// width: '58rpx',
|
||||
// height: '72rpx',
|
||||
// rotate: 0,
|
||||
// alpha: 1
|
||||
// }
|
||||
// })
|
||||
// this.marker.push(obj)
|
||||
// console.log('this.marker', this.marker);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 图标点击
|
||||
markerClick(e) {
|
||||
console.log('标记点击', e);
|
||||
|
||||
Reference in New Issue
Block a user