我有我的经度和纬度值在我andoroid的应用程序,我将它们传递给URL作为官方Android文档时说,对导航不工作,像这样 -启动谷歌地图使用经度和纬度
String query_string = "google.navigation:q=" +location.getLatitude()+","+location.getLongitude();
Uri gmmIntentUri = Uri.parse(query_string);
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
//mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);
谷歌地图打开安静好,但它允许说路线不能找到。
,我可以看到的经度和纬度值我在谷歌地图的地址栏通过。它显示“找到最佳路线”,然后显示错误消息“找不到路线”。它也发生在所有模式中(走路,驾驶......)。不知道为什么。
你能分享的价值观纬度,经度?另外,你目前的职位是什么?您是否可以尝试[Google地图网址](https://developers.google.com/maps/documentation/urls/guide)作为最新(2017年)并由Google建议生成地图链接? – xomena
xomena我在帖子中添加了一个图片 –
为什么'mapIntent.setPackage(“com.google.android.apps.maps”);'注释掉了? – Vinnie