Android:嵌入小 MapView 很慢
我想在显示用户位置的活动中嵌入一个小方块。问题是,当我放入 MapView 时,该 Activity 需要大约 15 秒的时间来加载。当我取出 MapView 时,该 Activity 只需要大约 2-3 秒的时间来加载。是否有任何建议可以加快速度,或者我应该将其替换为引导用户访问官方地图应用程序的按钮?
I want to embed a small square in an Activity showing the user's location. The problem is, the activity takes about 15 seconds to load when I have the MapView in. When I take the MapView out, the Activity only takes about 2-3 seconds to load. Are there any suggestions to speed this up or should I just replace it with a button that directs the user to the official maps app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用静态谷歌地图 API。它有很多功能(缩放级别、标记、附近查询)并且实现非常简单,您只需要发送 GET 请求即可。
当您收到图像数据时,只需将其放入 ImageView 中即可。
文档:http://code.google.com/apis/maps/documentation/staticmaps/
Try to use the static google maps api. It has a lot of features (zoom level, markers, nearby query) and the implementation is very easy, you just need to send a GET request.
When you do receive the image data, just put it into an ImageView.
documentation: http://code.google.com/apis/maps/documentation/staticmaps/