【问题标题】:New Update of google maps app doesnt display a mark that i create in android谷歌地图应用程序的新更新不显示我在 android 中创建的标记
【发布时间】:2013-07-15 20:00:40
【问题描述】:

您好,我打算通过地理向谷歌地图发送位置:用他的纬度和经度,并用标题标记位置。但知道我在 android 4.2.2 上更新了谷歌地图 v7.0.1,它不会显示我在代码中所做的标记。这是我用来调用地图的代码。

Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
        Uri.parse("geo:"+latitude+","+longitude+"?q="+latitude+","+longitude+"("+name+")"));
    intent.setComponent(new ComponentName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"));
                startActivity(intent);

【问题讨论】:

    标签: android google-maps google-maps-markers android-4.2-jelly-bean


    【解决方案1】:

    好像不支持了。 在Google UrisRFC 3986geo: Uri Draft 中也没有提到这种语法。

    如果此时谷歌地图没有找到给定的名字,将没有搜索结果。您可以删除名称,谷歌地图将在给定点绘制一个带有街道名称的标记。

    Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
        Uri.parse("geo:"+latitude+","+longitude+"?q="+latitude+","+longitude+"("+name+")"));
    intent.setComponent(new ComponentName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"));
                startActivity(intent);
    

    【讨论】:

    • Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("geo:"+latitude+","+longitude+"?q="+latitude+","+longitude) ); intent.setComponent(new ComponentName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"));开始活动(意图);它的工作原理谢谢你
    • 在您提到的任何页面上都没有提到它;不过,它肯定停止在 Google Maps 7 中工作。失去如此有用的功能令人失望。
    猜你喜欢
    • 2016-01-05
    • 2012-08-25
    • 1970-01-01
    • 2013-07-31
    • 2017-11-29
    • 2012-02-21
    • 2023-04-09
    • 2017-07-17
    • 2014-05-25
    相关资源
    最近更新 更多