uniapp:根据目的地经纬度,名称,唤起高德/百度地图来导航,兼容App,H5,小程序
1、需要自行申请高德地图的key,配置
manifest.json
2、MapSelector选择组件封装
<template><view><u-action-sheet :list="mapList" v-model="show" @click="changeMap"></u-action-sheet></view>
</template><script>export default {name: 'MapSelector',props: {// 是否显示选择菜单visible: {type: Boolean,default: false},// 地点标题title: {type: String,default: ''},// 纬度latitude: {type: [String, Number],default: ''},// 经度longitude: {type: [String, Number],default: ''},// 详细地址(可选)address: {type: String,default: ''}},data() {return {show: false,mapList: [{text: '高德地图'},{text: '百度地图'},]}},watch: {visible: {handler(newVal) {this.