提交 2e35adba 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

feat(h5 openLocation): 支持高德地图

上级 25bfc00c
......@@ -7,29 +7,29 @@
:markers="[marker, location]"
@regionchange="onRegionChange"
>
<div
class="map-move"
@click="moveToLocation"
<div
class="map-move"
@click="moveToLocation"
>
<i>&#xec32;</i>
</div>
</v-uni-map>
<div class="info">
<div
class="name"
@click="setCenter(marker)"
<div
class="name"
@click="setCenter(marker)"
>
{{ name }}
</div>
<div
class="address"
@click="setCenter(marker)"
<div
class="address"
@click="setCenter(marker)"
>
{{ address }}
</div>
<div
class="nav"
@click="nav"
<div
class="nav"
@click="nav"
>
<svg
width="26"
......@@ -45,9 +45,9 @@
</svg>
</div>
</div>
<div
class="nav-btn-back"
@click="back"
<div
class="nav-btn-back"
@click="back"
>
<i class="uni-btn-icon">&#xe601;</i>
</div>
......@@ -147,6 +147,11 @@ export default {
}%2C${this.longitude}&from=${encodeURIComponent(
'我的位置'
)}&to=${encodeURIComponent(this.name || '目的地')}&ref=${mapInfo.key}`
} else if (mapInfo.type === MapType.AMAP) {
url = `https://m.amap.com/navi/?dest=${this.longitude},${this.latitude}&key=${mapInfo.key}`
if (this.name) {
url += `&destName=${this.name}`
}
}
window.open(url)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册