flat: 暂存 添加定位处理70%,key达上限未测
This commit is contained in:
25
api/map.js
25
api/map.js
@@ -23,15 +23,22 @@ export const getcoder = (location, key, get_poi) => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
// return request({
|
||||
// url: 'https://apis.map.qq.com/ws/geocoder/v1',
|
||||
// method: 'get',
|
||||
// params: {
|
||||
// location,
|
||||
// key,
|
||||
// get_poi
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
// 地名解析
|
||||
export const getAddresscoder = (params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const paramsData = {
|
||||
...params,
|
||||
output: 'jsonp'
|
||||
}
|
||||
jsonp('https://apis.map.qq.com/ws/geocoder/v1', paramsData, 30000)
|
||||
.then((response) => {
|
||||
return response
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/*关键词输入提示*/
|
||||
|
||||
Reference in New Issue
Block a user