【问题标题】:Launch map Intent with more than one location使用多个位置启动地图 Intent
【发布时间】:2019-04-17 15:33:00
【问题描述】:

我想打开地图并显示一系列位置(在每个位置上放置一个 PIN)。我了解到您可以使用以下代码打开一个位置:

Uri uri = Uri.parse("geo:0,0?q=22.99948365856307,72.60040283203125                                                      
    (Maninagar)");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

有什么办法吗?

【问题讨论】:

    标签: java android google-maps maps


    【解决方案1】:

    您可以使用map view 创建新的活动或片段。 然后将您的标记添加到该地图。 此外,您可以在每个标记上添加侦听器并通过单击打开谷歌地图。

    【讨论】:

    • 嗨 Onix,是的,我知道,但现在 Google 地图不再免费。有一个试验,但如果可行的话,我更喜欢这个解决方案
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多