Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Map Marker Clickable Area

I am using this example: https://github.com/galex/android-mapviewballoons

My problem is that the clickable area is wider than the marker itself. For example, my Google Map marker is 25x25 then the clickable area would extend up to 70x70. This is a big problem for overlapping markers.enter image description here

When I clicked on the tip of that arrow, onTap is activated, even though the tap area is far from the marker.

Please help me. Thanks.

like image 454
Jayson Tamayo Avatar asked Nov 08 '11 09:11

Jayson Tamayo


1 Answers

This is the default behaivior of ItemizedOverlay. 25x25 px is generally not an adquate touchable area for most human fingers.

You should override the hitTest() method if you want to modify the way an overlay item hit is tested.

like image 167
Jeff Gilfelt Avatar answered Sep 28 '22 00:09

Jeff Gilfelt