java - Android mapView: rotate overlay item -


i want rotate overlay item (a drawable) according bearing onlocationchanged. how do this? tried drawable, itemizedoverlay, , overlayitem, no success.

public void bearingrotation(float boatbearing){                          bitmap bm = ((bitmapdrawable)drawablecurrpos).getbitmap();               matrix mat = new matrix();     mat.postrotate(boatbearing);     bitmap bmaprotate = bitmap.createbitmap(bm, 0, 0, bm.getwidth(),bm.getheight(), mat, true);      drawablecurrpos = new bitmapdrawable(bmaprotate);                        } 

i suggest convert drawable bitmap.

 bitmap bm = ((bitmapdrawable)drawable).getbitmap(); matrix mat = new matrix();         mat.postrotate(90);         bitmap bmaprotate = bitmap.createbitmap(bm, 0, 0, bm.getwidth(),bm.getheight(), mat, true); 

convert bmaprotate using bitmapdrawable , apply pin pointer location.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -