android - It is possible to remove the Shadow of the Icons (items) on a googlemap? -
i have google map these kind of items on it:
drawable3 = this.getresources().getdrawable(r.drawable.trazeicon);
but automatically, android draws shadow of image trazeicon
on map, , don't want have shadow.
how can remove it?
edit:
i got error: syntax error, insert "}" complete classbody
here full code:
package com.gpsloc; import java.util.arraylist; import android.app.alertdialog; import android.content.context; import android.graphics.canvas; import android.graphics.rect; import android.graphics.drawable.drawable; import com.google.android.maps.itemizedoverlay; import com.google.android.maps.mapview; import com.google.android.maps.overlayitem; public class myitemizedoverlay extends itemizedoverlay { private arraylist<overlayitem> moverlays = new arraylist<overlayitem>(); private context mcontext; public myitemizedoverlay(drawable defaultmarker) { super(boundcenterbottom(defaultmarker)); } protected overlayitem createitem(int i) { return moverlays.get(i); } public int size() { return moverlays.size(); } public void addoverlay(overlayitem overlay) { moverlays.add(overlay); populate(); } public myitemizedoverlay(drawable defaultmarker, context context) { //super(defaultmarker); super(boundcenterbottom(defaultmarker)); mcontext = context; } public void clear() { moverlays.clear(); } protected boolean ontap(int index) { overlayitem item = moverlays.get(index); alertdialog.builder dialog = new alertdialog.builder(mcontext); dialog.settitle(item.gettitle()); dialog.setmessage(item.getsnippet()); dialog.show(); return true; } public void draw(canvas canvas, mapview mapview, boolean shadow) { if(!shadow) { super.draw(canvas, mapview, false); } } }
you need override draw()
method when extend itemizedoverlay. this:
public class myitemizedoverlay extends itemizedoverlay { @override public void draw(canvas canvas, mapview mapview, boolean shadow) { if(!shadow) { super.draw(canvas, mapview, false); } } .... }
Comments
Post a Comment