我想从我的应用程序中调用内置地图应用程序。我偶然发现了this link。这个页面还给了我this link,在那里我可以真正得到我想要的东西。我知道呀
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);我怎么才能修复它?
发布于 2013-02-14 21:50:20
你可以试试这个……
Intent mapintent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("geo:0,0?q="+lat_string+long_string+"(Title_to_show)"));其中lat_string和long_string是原始格式,即76.6464831 35.494之类的..
https://stackoverflow.com/questions/10363712
复制相似问题