为什么我的 Android 应用程序显示谷歌地图时地图上有小方框?
我正在开发一个 Android 应用程序。它之前工作正常,但后来我不得不重新安装我的机器,并且我丢失了我的 debug.keystore。因此,我为新的 debug.keystore 生成了一个新的 api 密钥,但现在我看到了地图,但地图上有小灰色框。知道为什么会发生这种情况以及如何摆脱这些盒子吗?顺便说一句,我正在 Linux 机器上开发,确切地说是 Ubuntu 10.04。
I am working on an android app. It was working correctly before but then I had to re-install my machine and I lost my debug.keystore. So I generated a new api key for the new debug.keystore but now I see map but with small grey boxes over the map. Any idea why this is happening and how to get rid of these boxes? BTW I am developing on a linux machine, Ubuntu 10.04 to be exact.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否使用maplayout编辑了.xml文件?
如果您的代码中有以下内容,则可能会导致这种情况
,根据我的阅读,这是 Google Maps API 中的一个错误 另外,如果您没有将街景视图设置为 true 或任何其他视图,您应该尝试将其设置为 false 因为我我认为它默认将其设置为 true ..但我建议对三个视图进行一些实验,看看哪些视图为您提供了白框,哪些视图可以一起激活,哪些不能一起激活..
如果您愿意,这里是三个视图想要尝试:
Did you edit the .xml file with the maplayout?
And this might be caused if you have the
in your code, From my reading this is a bug in the Google Maps API Also if you didn't set the street view to true or any other view you should try setting it to false because i think it sets it to true by default.. But i recomend experiment little with the three views see which ones that gives you the white boxes and which ones that can be activated together and which ones that cannot..
Here is the three views if you want to experiment:
我得到的常见建议是不要一起使用 setStreeView(true) 和 setSatellite(true) 。有些人甚至建议完全不要使用 setStreetView(true)。但我的代码之前工作正常。我不得不重新安装我的机器,因此重新安装了 android SDK 和其他组件。所以我的猜测是这是某个特定版本的问题但我发现这个问题发生在 2.2 的特定修订版上 - 在我的例子中是 Android SDK Platform 2.2,修订版 3。我尝试在 2.3 上运行相同的代码并且它工作正常即没有灰色框。
The common suggestion that I have got is to dont use setStreeView(true) and setSatellite(true) together. Some have even suggested not to use setStreetView(true) altogether. But my code was working okay before. I had to reinstall my machine and therefore installed android SDK and other components afresh. So my guess is that this is an issue with some specific version But I have found out that this problem occurs specific revision of 2.2 - in my case Android SDK Platform 2.2, revision 3. I have tried running same code on 2.3 and it works correctly i.e no grey boxes.