8158921-50a76999e138f579.jpeg
高德地图的poi不能点击信息窗口然后获取当前的经纬度,然后我百度了一下,自己修改了样式,最后就成功了。
要先引入cdn高德的地址
html
搜索
@click="openMarkerTipById1(index,$event)"
@mouseout="onmouseout_MarkerStyle(index+1,$event)"
:key="index">
>
{ {item.name}}
地址:{ {item.address}}
电话:{ {item.tel}}
js
export default {
data() {
return {
address:'',//保存地址的汉字名字
map:'',//保存地址的经纬度
address:'',//搜索的地区
poiArr: [],//左边搜索出来的数组
windowsArr: [],//信息窗口的数组
marker: [],
mapObj: "",//地图对象
selectedIndex: -1
};
},
mounted() {
this.mapInit()
this.placeSearch("")
},
methods: {
//创建一个map
mapInit() {
this.mapObj = new AMap.Map("iCenter", {