Add Glow Effect Around my custom marker in Android Google Map v2 -
i stuck in task of adding custom marker glow. have attached desired image. wondering find solution not able solve. marker code using this.
map.addmarker(new markeroptions() .title(title) .position(points) .snippet(snippet) .icon(bitmapdescriptorfactory.fromresource(res)) ).showinfowindow();
i don't want use image. want through code ,help me please. thanks!
you can draw normal custom marker bitmap on glow effect(only) bitmap.
that should this:
int resourceidcar = r.drawable.car; bitmap bmpcar = bitmapfactory.decoderesource(getresources(), resourceidcar); int resourceidarrow = r.drawable.arrow; bitmap bmparrow = bitmapfactory.decoderesource(getresources(), resourceidarrow); bitmap bmpoverlay = overlay(bmpcar,bmparrow); mymarker = googlemap.addmarker(new markeroptions() .position(derekpos) .icon(bitmapdescriptorfactory.fromresource(r.mipmap.ic_launcher)) .title("hello world") .draggable(true) //.icon(bitmapdescriptorfactory.fromresource(r.drawable.car)) .icon(bitmapdescriptorfactory.frombitmap(bmpoverlay)) ); //=-=-=-=-=-=-= private bitmap overlay(bitmap bmp1, bitmap bmp2) { bitmap bmoverlay = bitmap.createbitmap(bmp1.getwidth(), bmp1.getheight(), bmp1.getconfig()); canvas canvas = new canvas(bmoverlay); canvas.drawbitmap(bmp1, new matrix(), null); canvas.drawbitmap(bmp2, new matrix(), null); return bmoverlay; }
Comments
Post a Comment