在Android中正确旋转MapView的最简单方法?

发布于 2024-12-10 13:58:30 字数 335 浏览 2 评论 0原文

我有一个 Android Activity,它通过 MapView 控件显示 Google Maps 并扩展 MapActivity。当我使用方法 mapView.setRotation(some Integer) 而不是实际的图像旋转来编程旋转 MapView 时,整个控件将旋转,如下面的快照所示。谷歌地图默认应用程序旋转地图的最简单方法是什么?

我正在使用最新的地图和 Android API

在此处输入图像描述

I have an Android Activity that displays Google Maps through MapView control and extending MapActivity. When I progrmatically rotate the MapView using method mapView.setRotation(some Integer) instead of actual image rotation whole control rotates as shown in snapshot below. What is the simplest way to rotate map as done by default app of Google Maps.

I am using latest Map and Android APIs

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳哥哥 2024-12-17 13:58:30

查看 ANDROID_SDK\add-ons\addon-google_apis-google_inc_-7\samples\MapsDemo 中的 MapsDemo 示例。它有旋转地图演示!

Check out MapsDemo examples in ANDROID_SDK\add-ons\addon-google_apis-google_inc_-7\samples\MapsDemo. It has rotation map demo!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文