Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android-谷歌地图显示位置名称,而不是经度和纬度_Android_Google Maps_Android Intent_Geolocation - Fatal编程技术网

Android-谷歌地图显示位置名称,而不是经度和纬度

Android-谷歌地图显示位置名称,而不是经度和纬度,android,google-maps,android-intent,geolocation,Android,Google Maps,Android Intent,Geolocation,我有此代码来启动导航活动 String uri = "geo:0,0?q=<lat>,<long>"; startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri))); stringuri=“geo:0,0?q=,”; startActivity(新意图(android.content.Intent.ACTION_视图,Uri.parse(Uri)); Google Maps启

我有此代码来启动导航活动

String uri = "geo:0,0?q=<lat>,<long>";
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));
stringuri=“geo:0,0?q=,”;
startActivity(新意图(android.content.Intent.ACTION_视图,Uri.parse(Uri));
Google Maps启动并在地图上显示正确的位置,但在底部面板上,我看到的不是要查找路线的位置名称,而是我发送的纬度和经度


lat/long数据可以确定我想要的位置,但在发送时会显示此信息位置名称可能会如我所料显示,但可能会与几个类似的位置混淆。我怎样才能解决这个问题呢?

我不太确定我是否完全理解你的要求,但听起来好像你想要什么。您可以使用它将Lat/Lng转换到某个位置。它通常给出非常详细的响应,通常包括街道地址号,因此这是区分类似位置的一种方法。

您可以使用以下URI在谷歌地图的标记中显示名称:

   String uri = "geo:0,0?q=34.99,-106.61(Treasure)";
如中所述