如何在地图上的android系统中的另一个图像显示的图像? [英] how to show image within another image on map in android?
本文介绍了如何在地图上的android系统中的另一个图像显示的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在地图上的另一个图像显示的图像。
喜欢
下面红色的图像是不同的图像,黑的偶像形象的是不同的。
解决方案
公共位图mergeBitmaps(位图manBitmap){
尝试{
位图markerBitmap = BitmapFactory.de codeResource(this.getResources(),R.drawable.red_box_image);
位图bmOverlay = Bitmap.createBitmap(markerBitmap.getWidth(),markerBitmap.getHeight(),markerBitmap.getConfig());
帆布油画=新的Canvas(bmOverlay);
canvas.drawBitmap(markerBitmap,新的Matrix(),NULL);
canvas.drawBitmap(manBitmap,5,5,NULL);
返回bmOverlay;
}
赶上(例外前){
ex.printStackTrace();
返回null;
}
I want to show image within another image on map.
like
Here red colored image is different Image and the black idol image one is different .
解决方案
public Bitmap mergeBitmaps(Bitmap manBitmap){
try{
Bitmap markerBitmap = BitmapFactory.decodeResource( this.getResources(), R.drawable.red_box_image);
Bitmap bmOverlay = Bitmap.createBitmap(markerBitmap.getWidth(), markerBitmap.getHeight(), markerBitmap.getConfig());
Canvas canvas = new Canvas(bmOverlay);
canvas.drawBitmap(markerBitmap, new Matrix(), null);
canvas.drawBitmap(manBitmap, 5, 5, null);
return bmOverlay;
}
catch(Exception ex){
ex.printStackTrace();
return null;
}
这篇关于如何在地图上的android系统中的另一个图像显示的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文