可以指定/减少地图视图上项目的 onTap 区域吗?

发布于 2024-10-08 18:47:31 字数 192 浏览 0 评论 0原文

我有一个 mapview,带有 itemizedoverlay,就像 Android 开发人员示例一样。但现在我有一个问题。当用户在地图上按 32x32 项目图像外 1 或 2 厘米时,将打开该项目的对话框。我不想要这样。我想将项目的“按压”区域缩小到地图上项目图像的 32x32 比例,

我该怎么做?

I have a mapview, with itemizedoverlay, like on Android developers example. But now I have a problem. When the user presses 1 or 2 cm out of the 32x32 image of the item on the map, the dialog of the item opens. I don't want that. I want to reduce the "press" area of the item to the 32x32 proportions of the image of the item on the map

How can I do that?

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

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

发布评论

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

评论(2

染火枫林 2024-10-15 18:47:31

我在使用 ItemizedOverlay 时遇到了同样的问题,最终使用了普通的 Overlay。然后我需要编写自己的方法来测量用户在屏幕上的点击,并使用本文中的方法:

http://blog.pocketjourney.com/2008/03/19/tutorial-2-mapview-google-map -hit-testing-for-display-of-popup-windows/

如果有人有 ItemizedOverlay 的解决方案,如果他们可以分享,那就太好了。

BR,
瓦尼亚

I had the same problem with ItemizedOverlay, and ended up using a normal Overlay instead. Then I needed to write my own method for measuring users tap on screen, and used the approach in this article:

http://blog.pocketjourney.com/2008/03/19/tutorial-2-mapview-google-map-hit-testing-for-display-of-popup-windows/

If anyone has the solution to the ItemizedOverlay it would be great if they could share.

BR,
Vanja

满意归宿 2024-10-15 18:47:31

最后我通过清除 ontap 方法来删​​除 ontap 区域

finally i remove the ontap area by clearing the ontap method

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