ItemizedOverlay.onTap() imprecise?

by gnugu » Tue, 16 Feb 2010 07:50:55 GMT

Sponsored Links
I'm using Google maps. I put the markers on map and my inherited
ItemizedOverlay overrides onTap() method.

Markers are 32x32 images.

However, I can tap quite a bit away from the marker and still receive
the event.
This becomes a problem when markers are close to each other.

Anybody knows why this is?



ItemizedOverlay.onTap() imprecise?

by gnugu » Wed, 17 Feb 2010 02:45:26 GMT

 And here is my answer:
        protected boolean hitTest(SearchResultOverlayItem item,
            int hitX,
            int hitY) {

                if (hitX > -22 && hitX < 22
                                && hitY < 4 && hitY > -36) {
                        return true;
                return false;


Sponsored Links

Other Threads

1. moving from one screen to another

Hey everybody,

I have designed a couple of screens in android under different
projects. I want to bring them to a single project and connect the
screens on basis of some event such as button click. how can I do it?

 - Naan


2. Control F11 doesn't revert the orientation on emulator on SDK 1.5 Target

I have an activity defined in the manifest with the attribute

When I run the app on SDK 1.5, pressing Ctrl + F11 and change the
orientation to landscape and then again press Ctrl+F11, the
orientation of the emulator changes, but not the screen orientation.
is there something new in 1.5 that we need to define.

I have gone through Dan Morrill's  blog post at
on rotations, but it doesn't talk about how we can support both

3. how to add some key actions from physical keyboard to android

4. how to get the string from a listview item

5. Error playing YouTube video in my application

6. SDK1.5 AudioRecord sample rate problem

7. how can i open the jd file under developments/pdk/docs