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:
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
Post a Comment