How do I show a marker in Maps launched by geo URI Intent?

后端 未结 7 1656
离开以前
离开以前 2020-11-28 02:47

I have a application where I want to show different locations (one at the time, picked by user input) by launching Google Maps with their specific geo coordinates.

I

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 03:24

    I just confirmed the following snippet from @Kenton Price still works on Android 4.4 (KitKat):

    Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:,?q=,(Label+Name)"));
    startActivity(intent);
    

提交回复
热议问题