想要显示地图但没有当前位置。需要什么?
在我的实际项目中,我需要绘制一个 MapView,上面有给定的跑步/步行/骑自行车路径。
我不需要当前位置,因此我仅为路径添加了覆盖层(没有 MyLocationOverlay)。路径已绘制,但我在模拟器中看不到地图 - 只有灰色瓷砖。 apiKey 在布局(MapView)中设置,INTERNET 权限在 Manifest 中设置。
所以我想知道我是否需要更多。是模拟器工作不正常(我的模拟器中有 3G 和 2 条)还是我需要其他东西?我是否需要构建额外的覆盖层或向清单添加额外的权限(xxxLOCATION)?
In my actual project I need to draw a MapView with a given running/walking/cycling path on top of it.
I don't need the current position so I added an overlay just for the path (no MyLocationOverlay). The path is painted but I don't see the Map in the emulator - only the grey tiles. The apiKey is set in the layout (MapView) and INTERNET permission is set in the Manifest.
So I'm wondering if I need more. Is it the emulator simply not working well (I do have 3G and 2 bars in the emulator) or do I need something else? Do I need to build an additional overlay or add additional permissions (xxxLOCATION) to the Manifest.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你描述的是我只有在地图键错误时才看到的东西。是你自己生成的吗?如果您在模拟器中运行未签名的 .apk,则应该 按照这些步骤。
You're describing what what I've only seen when I've got the map key wrong. Did you generate it yourself? If you're running the unsigned .apk in the emulator you should be following these steps.