MapView MultiTouch 缩放(捏合)不可靠且混乱

发布于 2024-11-07 13:33:45 字数 584 浏览 0 评论 0原文

我使用 Google 的 MapView,但遇到了更大的问题。尤其是多点触控缩放。我使用的是 Android 2.2 平板电脑。要实现此功能,首先需要在 AndroidManifest 中指定支持 xlarge 屏幕。

那么现在会发生什么。 90% 的时间缩放都有效。但有时它不起作用,并且我的所有叠加层(我还使用来自mapballons项目的视图来显示在地图顶部)四处移动,而图块保持不变在同一位置。缩放不再起作用。几秒钟后,当转储时,它会再次开始工作。

我不知道为什么会出现这种情况,logcat中也没有任何异常。

我还在 MapView 上附加了一个 SimpleGestureListener,但不使用重要的手势(仅双击)。但没有 GestureListener 也会出现这个问题。

如果有人也有这种奇怪的行为并且知道为什么会发生这种情况,那将会很有帮助。

编辑:在这种奇怪的模式下,也无法使用缩放按钮进行缩放并切换到卫星。它完全做出了奇怪的反应

EDIT2:我可以确认这是我在 2.2 平板电脑上的更多应用程序。它也主要发生在你开始捏住地图左侧时

I use the MapView from Google and have real bigger problem with it. Especially with the multitouch zooming. I am using an Android 2.2 Tablet. First thing needed to make this working was specifing in the AndroidManifest that xlarge screens are supported.

So what happen now. 90 % of the time zooming works. But sometimes it does not work and all my overlays (I also use Views from mapballons project to display on top of the map) are moving around while the tiles stay at the same position. Zooming does not work anymore. After some seconds and touching around as dump it begins to work again.

I don't know why that happens, and there are no exception in the logcat.

I have also attached an SimpleGestureListener on the MapView but don't consume gestures which are important (only Double Tap). But the problem also occurs without a GestureListener.

It would be helpful if someone had also such strange behaviour and know why that happens.

EDIT: While in that strange mode, it is also not possible to zoom with the zoom button and toggle to satelite. It totally reacts strange

EDIT2: I can confirm this is in more application i have on the 2.2 Tablet. It also occurs mainly when you start pinnching in the left side of the map

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

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

发布评论

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

评论(2

°如果伤别离去 2024-11-14 13:33:45

这听起来与此处发布的问题相同:奇怪的 MapView 问题;像素转换器错误

This sounds like the same problem posted here: Weird MapView problem; PixelConverter Error

悲念泪 2024-11-14 13:33:45

它发生在 MapView 左侧的原因是因为您的拇指已注册为多点触控。当这种情况发生时,一些计算就会被捏造。

The reason that it happens on the left side of the MapView is because your thumb is registered as a multi-touch. Some caculation gets fudged up when that happens.

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