gpt4 book ai didi

Android GoogleMap 需要激活吗?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:14:49 28 4
gpt4 key购买 nike

我目前的项目是关于一个应用程序和一个支持完全离线的 GoogleMap。

长话短说:

  • 我将 MapFragment 与 com.google.android.gms.maps.GoogleMap 一起使用
  • 还有一个离线 overlayDrawable 和标记
  • 参见 http://codemax.de/upl/offline_map.png
  • 我真的不需要谷歌地图本身,只需要 mapView

问题:

我的 GoogleMap 保持完全灰色,直到它至少有一次在线连接。一旦我建立了连接,我的叠加层+ map 标记就变得可见了。在此之后,我的 map 在离线状态下完全可以正常工作。

问题:

如何在没有任何在线连接的情况下使我的 map (叠加层+标记,仅此而已...)工作?此外:我没有找到任何文档说存在这样的行为/激活......

.

编辑:我不需要任何离线 map Material (我有叠加层!),不幸的是,切换到另一个 map API 可能不是一个选项。

最佳答案

关于此的官方信息不多,但在Google Maps API 错误报告和功能请求论坛帖子中有几个有趣的帖子:

  • Issue 5017 (状态:已修复)解决了每次设备离线时加载 map 的问题,但有以下注意事项:

(...) There is still a requirement for an internet connection when the application is first loaded but there is no longer an issue with later opening the application and using the map while there is no connection.

  • Issue 5496 (状态:新建)发布于 2013 年 6 月 12 日,尚未解决:

Currently, you need an internet connection on the first activity launch to even enable offline functionality on the Map fragment. Is it possible to allow loading of tiles using an offline tile provider without doing the initial API key check esp. when the map type is GoogleMap.MAP_TYPE_NONE? I think the API key check should really be limited to cases where map type is anything besides MAP_TYPE_NONE.

因此,根据现有信息(或缺少信息),首次加载应用程序时需要连接 Internet 以检查 API key 。之后,该应用程序将完全脱机运行。

关于Android GoogleMap 需要激活吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38203454/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com