繁体   English   中英

geo:latitude,longitude?z =在Android中缩放将我带到当前位置

[英]geo:latitude,longitude?z=zoom in android taking me to my current location

我想从我的应用程序调用内置地图应用程序。 我碰到了这个链接 该页面还为我提供了此链接 ,使我可以真正得到想要的东西。 我知道

geo:latitude,longitude?z=zoom

仍处于开发模式。

我的问题是,每当我使用它时,它都会到达所需的位置,但随后将我转移到当前位置。

这是我正在使用的邮政编码

String uri = String.format("geo:%f,%f?z=18",(float)(latitude /1E6),(float)(longitude/1E6));
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
startActivity(intent);

我该如何解决?

你可以试试这个

Intent mapintent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("geo:0,0?q="+lat_string+long_string+"(Title_to_show)"));

那里lat_stringlong_string是原始格式,即76.6464831 35.494

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM