开发者

It is possible to specify/reduce the onTap area of the items on a mapview?

开发者 https://www.devze.com 2023-02-01 02:42 出处:网络
I have a mapview, with itemizedoverlay, like on Android developers example. But now I have a problem. When the user press开发者_运维技巧es 1 or 2 cm out of the 32x32 image of the item on the map, the

I have a mapview, with itemizedoverlay, like on Android developers example. But now I have a problem. When the user press开发者_运维技巧es 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?



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


finally i remove the ontap area by clearing the ontap method

0

精彩评论

暂无评论...
验证码 换一张
取 消