- 获取 POI 数据
- 获取输入提示词
- 获取地址描述数据
- 获取天气
const amap = AmapWx.getInstance({ key: "key" });
amap.getWxLocation(async (loc) => {
// 获取 POI 数据
const PoiAroundRes = await amap.getPoiAround({ location: loc });
// 获取地址描述数据
const regeoRes = await amap.getRegeo({ location: loc });
// 获取天气
const weatherRes = await amap.getWeather({
city: regeoRes.data.regeocode.addressComponent.adcode,
});
const cityWeather = weatherRes.data.lives[0];
});
// 获取输入提示词
const InputtipsRes = amap.getInputtips({ keywords: "keywords" });