Android“你好,MapView"教程 - 地图图块不加载 [英] Android "Hello, MapView" Tutorial - Map Tiles Do Not Load

查看:37
本文介绍了Android“你好,MapView"教程 - 地图图块不加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Android 软件开发的新手,也是本网站的新手.我希望有人可能对我遇到的问题有一些经验.

I am new to Android software development and new to this site. I am hoping someone might have some experience with the problem I am having.

我一直在关注 你好,MapView 教程 不仅要学习Android框架,还要学习谷歌地图库.我已尽我所能完全按照教程的指示来实现.我的问题是应用程序确实在我的模拟器中加载(甚至在我的手机上),但地图图块没有加载.

I've been following the Hello, MapView tutorial in order to not only learn the Android framework, but also the Google Maps library. I've tried my best to implement things exactly as the tutorial has instructed. My problem is that the application does load in my emulator (or even on my phone for that matter), but the map tiles do not load.

在 Google 上搜索我在另一个网站上发现其他人的帖子有同样的问题,但他/她的问题是添加到 AndroidManifest.xml 文件的重要元素的顺序不正确.我仔细检查了我的这个,但一切似乎都是正确的.

Searching Google I found a post by someone else on another site having the same issue, but his/her problem was that the important elements added to the AndroidManifest.xml file were not in the right order. I double-checked this in mine, but everything seems to be right.

所以,我不确定问题是什么,并希望其他人以前见过这个.如果有帮助,我可以提供任何代码片段.

So, I am not sure what the issue is and was hoping others have seen this before. I can provide any snippets of code, if that would help.

谢谢.

推荐答案

未加载磁贴通常是未正确设置 API 密钥的结果.获取 Maps API 密钥

Non-loading tiles are usually the result of not having the API key set up correctly. Obtaining a Maps API key

要回答您留给 d. 的回复:如果您希望它在从 Eclipse 运行时正常工作",您需要为您的调试证书获取 API 密钥.同一页面上有说明 和以前一样.请注意,您必须在发布之前换回另一个密钥.

To answer the response you left to d.: If you want to have it "just work" when you run from Eclipse you'll need to get an API key for your debug certificate. There's instructions on the same page as before. Do note that you'll have to swap back to your other key before publishing though.

这篇关于Android“你好,MapView"教程 - 地图图块不加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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