Hi all,

I apologize in advance for my ignorance.  I am a seasoned SW developer but 
new to Android.  I am developing my first Android application (MapActivity) 
for a friend of mine and have managed to fight my way through a myriad of 
problems handling gestures, not the least of which was* onTap(GeoPoint p, 
MapView mapView)* used to capture a non marker tap in the ItemizedOverlay 
intercepting every gesture available.  I settled on using *
OnSingleTapConfirmed* from DoubleTapListener and handling the 
marker/non-marker tap logic from there.  I have still one issue remaining I 
cannot seem to solve.  *OnSingleTapConfirmed *apparently is handled before 
the built in Zoom Controls, so when I tap in the space where the zoom 
controls are hidden, I get the non-marker tap behavior which is not what I 
want.

I figured I could simply do a hit test on the zoom control rectangle and if 
I get a hit, simply bail out of *OnSingleTapConfirmed* with a FALSE return 
value and let the built in logic take it from there.  I am able to get the 
rectangle for the zoom controls using  the MapView's *
getZoomButtonsController()* and then calling *getZoomControls()* from 
there.  I then call *getHitRect* to get the target touch area.  *The problem 
I am having is determining where the Zoom Control's starting x,y position is 
relative to the MapView.*  Once I can determine that, I can apply the offset 
to my hit rectangle and simply do a contains check.

It may be very simple and likely is and I can't see it (I've been looking at 
this too long and think I can't see the forest for the trees), but I'm 
spinning my wheels at this point.

Does anyone know how to find the built in zoom control's starting x,y 
position relative to the MapView?  If there is a simpler solution to 
ensuring the ZoomControls will still function properly when handling tap 
gestures, I am open to suggestions.  I appreciate any advice anyone would be 
willing to offer.

Thanks in advance.

Tom McManus

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to