uni.openLocation({  
  latitude: '22.854575168227097',  
  longitude: '108.27244097297996',  
  name: '测试位置',  
  address: '明细位置明细位置’  
})
自查问题
文件位置 plugins\uniapp-cli\node_modules\@dcloudio\uni-app-plus\template\common\__uniappopenlocation.js, plugins\uniapp-cli\node_modules\@dcloudio\uni-cli-shared\template\common\__uniappopenlocation.js  
问题发现
两个文件内使用的google地图接口貌似不生效, 'www.google.com/maps' 不生效
https://www.google.com/maps/?daddr="+encodeURIComponent(o)+"&sll="+encodeURIComponent(t+","+n)
解决办法
替换接口如下
https://maps.google.com/maps/?sll="+encodeURIComponent(o)+"&daddr="+encodeURIComponent(t+","+n)
编辑器重新运行到本地,可以正常唤醒谷歌地图并显示导航
            
            
            
            
1 个回复
重庆铭贝科技 - 重庆铭贝科技有限公司
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("geo:0,0?q=37.423156,-122.084917 (" + name + ")"));
startActivity(intent);