Android的:谷歌的MapView显示进度指标地图加载 [英] Android: Google MapView show a progress indicator while map is loading

查看:201
本文介绍了Android的:谷歌的MapView显示进度指标地图加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有听,如果<一的方式href=\"https://developers.google.com/maps/documentation/android/reference/com/google/android/maps/MapView\"相对=nofollow> 图形页面 仍在加载?因为我想显示进度指示器(如沙漏),而图形页面正在下载的地图图块。

Is there a way to listen if a MapView is still loading? Because I want to show a progress indicator (such as an hourglass) while the MapView is downloading the map tiles.

任何解决方案?

推荐答案

的<一个href=\"https://developers.google.com/maps/documentation/android/reference/com/google/android/maps/MapView#onDraw%28android.graphics.Canvas%29\"相对=nofollow>的onDraw 以图形页面文件说

我们绘制地图背景(装载砖如适用)

"We draw the map background (loading tiles as appropriate)"

您可以尝试扩展图形页面和隐藏进度指示条的onDraw结束。但我的猜测是,该MapTiles的异步加载等等统统加载MapTiles在你的进度条将完成。

You could try extending MapView and hiding progress indicator as onDraw finishes. But my guess would be that the MapTiles are loaded asynchronously so your progress bar would finish before the MapTiles were all loaded.

这篇关于Android的:谷歌的MapView显示进度指标地图加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆