Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Android 2 Application Development
This is the forum to discuss the Wrox book Professional Android 2 Application Development, 2nd Edition by Reto Meier; ISBN: 978-0-470-56552-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Android 2 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2010, 12:53 AM
Registered User
 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Overlays Question

Hi,

I haven't been able to achieve 1 action for a user clicking an OverlayItem and 1 action for a user clicking an empty location on the map.


I can't seem to get

@Override
public boolean onTap(GeoPoint point, MapView mapView){ Toast.makeText(TaskMapView.this, "boo", Toast.LENGTH_SHORT).show(); return false;}

To fire when

@Override
protected boolean onTap(int index) { OverlayItem item = mOverlays.get(index);
if(item != null){
AlertDialog.Builder dialog = new AlertDialog.Builder(TaskMapView.this);
dialog.setTitle(item.getTitle());
dialog.setMessage(item.getSnippet());
dialog.show();
return true;
}
return false;}


is active.

I tried using 2 overlays, changing the true/false of the return values to various combinations but the best I could get is 1 Itemizedoverlay firing for the protected onTap and one Overlay (plain) firing for the map click.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple select box question cstooch Classic ASP Professional 5 December 10th, 2007 06:56 PM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
Multiple ADO multiple user login Oracle9i jhay0721 Pro VB Databases 1 April 4th, 2005 11:23 AM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM
Updating multiple Rows from multiple fields in ASP vdm_nana SQL Server ASP 0 April 1st, 2004 04:26 AM



All times are GMT -4. The time now is 04:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.