return {};
},
created() {
let _this = this;
TMap().then(qq => {
//初始化中心点,传入想要设置的值...this.mapInit(经度, 纬度, 缩放比例);
});
},
methods: {
//父组件调用该函数,设置地点
setLoc(lng, lat)...{
this.mapInit(lng, lat, 16);
},
//搜索某一地点名
getLoc(ele) {
this....(error);
});
},
//根据传入的值渲染地图及传出经纬度和地名
mapInit(lng,lat,zoom) {
let _this = this...$axios({
url: url,
//这里的url跟上面也是相同的问题
method: "get",