- @markertap禁用地图中心回到自己位置
// marker createMarkers (parkLotList) { this.markers = parkLotList.map((item, index) => { return { id: index + 1, width: 45, height: 50, iconPath: '/static/img/parkLot.png', ...item } }) console.log(this.markers); }, // marker 点击事件 onMarkerTab ({ mp }) { this.visbleparking = true; // this.location=[]; this.target = this.markers.filter(marker => marker.id === mp.markerId)[0]; if (!this.target.distance) { let distance = calculateDistance(this.location, this.target) distance = distance >= 1000 ? (distance / 1000).toFixed(1) + 'km' : distance + 'm' this.target.distance = distance } },
2018-09-14 - 腾讯地图插件导航接口
var myPluginMap = requirePlugin('tencentMap'); // 引入腾讯地图插件 wx.openLocation({ latitude: this.location.latitude, longitude: this.location.longitude }) 想把wx.openLocation换成弹出腾讯地图插件进行导航,插件已经引用成功了,接口怎么调用。
2018-08-25 - 在小程序中怎么调用腾讯地图插件
小程序已经授权了腾讯地图插件,怎么在点击按钮的时候调用腾讯地图插件,怎么传参,弹框。 <cover-image @click='nav2target' mode='aspectFit' class="icon" src='/static/img/nav.png' /> nav2target () { // wx.openLocation({ // latitude: this.location.latitude, // longitude: this.location.longitude // }) 这里怎么写 },
2018-08-25