[英]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_string
和long_string
是原始格式,即76.6464831
35.494
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.