Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2012, 12:57 PM
Registered User
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Getting the Location That Was Touched

In Chapter 9, page 318 there is an explanation of how to get the location that was touched on a map. Does anyone know how to tell if the location that was touched was the zoom control? Thanks.

Very well written book, by the way.
 
Old March 19th, 2012, 01:41 PM
Registered User
 
Join Date: Mar 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default RE: Getting the location that was touched

You just click anywhere on the screen and a toast comes up with the geo co-ordinates. Better if you don't click on the zoom control if you want this to work properly.

Quick question - did you get the overlay bitmap to work? I couldn't get it to be visible and I'm desperately looking for a solution.....
 
Old March 19th, 2012, 01:54 PM
Registered User
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm assuming that you are referring to the previous section "Adding Markers" on page 315. I was able to get it to work, but I discovered that there are actually two different versions of the draw() method. One is for animated markers, and one is for static markers. The one listed in the book is actually for animated markers and will get called over and over again for the animation (you can set a breakpoint on it to test this). The signature for the other draw method (which I used) is:

@Override
public void draw(Canvas canvas, MapView mapView, boolean shadow) {
...
}

I'm not sure if this is what is causing your problem.
 
Old March 19th, 2012, 02:07 PM
Registered User
 
Join Date: Mar 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your reply. I tried your suggestion but it didn't make any difference.

Possibly only the elusive Mr Lee can help me now.....





Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Location Makepeace1 Classic ASP Databases 2 May 20th, 2008 07:51 AM
Database at different location gaurav_jain2403 ADO.NET 4 May 29th, 2006 12:50 AM
window.location crmpicco Javascript 1 July 7th, 2005 08:55 AM
Location.length=0 jack12345 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 June 21st, 2005 01:14 AM
One Location to Many Locations sudipkumar Biztalk 0 April 15th, 2005 08:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.