android - Changing Map Infowindow from alert dialogue to simple map Info -


i have map application in android.

there alert dialogue when click on marker, want convert alert dialogue simple infowindow this:

http://3.bp.blogspot.com/-pryuyqmcgcc/ta__3fccw7i/aaaaaaaaagu/xcxjk3slu4k/s1600/google_map_marker_tooltip_popup_android.jpg

here code i'm using populate infowindow:

public class customitemizedoverlay extends itemizedoverlay<overlayitem> { private arraylist<overlayitem> mapoverlays = new arraylist<overlayitem>(); private context context; public customitemizedoverlay(drawable defaultmarker) { super(boundcenterbottom(defaultmarker)); } public customitemizedoverlay(drawable defaultmarker, context context) { this(defaultmarker); this.context = context; } @override protected overlayitem createitem(int i) { return mapoverlays.get(i); } @override public int size() { return mapoverlays.size(); } @override protected boolean ontap(int index) { overlayitem item = mapoverlays.get(index); alertdialog.builder dialog = new alertdialog.builder(context); dialog.settitle(item.gettitle()); dialog.setmessage(item.getsnippet()); dialog.show(); return true; } public void addoverlay(overlayitem overlay) { mapoverlays.add(overlay); this.populate(); } } 

http://android-codes-examples.blogspot.in/2011/04/google-map-example-in-android-with-info.html did image from??? link , contains how it....but not ontap.

if want ontap, remove alert dialog box , ontap method , add toast tell location...thats general practice.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -