You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Maps新版Street View Deeplink无限加载问题求助

问题:Google Maps新版中DeepLink跳转街景无限加载

我使用Google官方文档提供的DeepLink代码实现跳转Google Maps街景功能,代码如下:

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById<Button>(R.id.launch_street_view_button).setOnClickListener {
            val gmmIntentUri = Uri.parse("google.streetview:cbll=46.414382,10.013988")

            val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
            mapIntent.setPackage("com.google.android.apps.maps")

            startActivity(mapIntent)
        }
    }
}

该示例代码来自Google官方文档,完整项目代码可查看对应仓库。

在旧版本Google Maps(11.29.7 #1066493137)中,该DeepLink可正常跳转街景;但更新至最新版本(11.57.4801 #1066791007)后,街景页面一直无限加载(测试等待超10秒仍无响应)。

测试环境为同一Pixel 4设备,Android代码未变更,仅通过Google Play更新/降级Google Maps版本。请问这是Google的Bug,还是需要调整Intent代码才能恢复正常?


分析与解决方案

1. 大概率是Google Maps的版本Bug

同一设备、同一代码仅因Maps版本更新就出现功能异常,基本可以判定是新版Maps的兼容性问题。这类问题通常是Google在版本迭代中调整了DeepLink的解析逻辑,导致旧协议格式的街景链接无法正常加载。

2. 调整Intent链接格式以兼容新版

可改用Google Maps官方推荐的通用HTTP URL格式替代原有的google.streetview:协议,这种格式兼容性更强,修改后的代码示例:

findViewById<Button>(R.id.launch_street_view_button).setOnClickListener {
    // 使用通用HTTP格式的街景链接
    val gmmIntentUri = Uri.parse("https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=46.414382,10.013988")
    val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
    mapIntent.setPackage("com.google.android.apps.maps")
    startActivity(mapIntent)
}

3. 后续验证与反馈

  • 先测试修改后的代码,确认是否能正常加载街景。
  • 若修改后仍无效果,可确定是Maps版本Bug,建议通过Google Maps内置的反馈渠道提交问题,附上版本号、设备信息和复现步骤,助力Google修复问题。

内容的提问来源于stack exchange,提问作者Elye

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 08:45:30