跳转高德地图 网页版

changeMap() {
var self = this;
AMap.plugin(["AMap.PlaceSearch"], function () {
//构造地点查询类
var placeSearch = new AMap.PlaceSearch({
pageSize: 1, // 单页显示结果条数
pageIndex: 1, // 页码
});
//关键字查询
placeSearch.search(self.Info.Name, function (status, result) {
console.log('dddd', result)
if (JSON.stringify(result)!="{}"&&result.poiList.pois.length>0) {// 查询成功时,result即对应匹配的POI信息
// window.location.href = "https://m.amap.com/search/mapview/keywords=" + self.Info.Name + "&city=" + result.poiList.pois[0].cityname + "&poiid=" + result.poiList.pois[0].id + "&src=pc";// pc
window.location.href = "https://m.amap.com/search/mapview/poiid=" + result.poiList.pois[0].id;//移动端
} else {
self.toast_warn("查无此地!");
return;
}
})
});
},

上一篇:无线射频转RS232


下一篇:Entity Framework扩展库