2016-02-23 49 views

回答

0

您可以使用IconFactory

IconFactory iconFactory = IconFactory.getInstance(<activity context>); 
new MarkerOptions().icon(iconFactory.fromResource(<drawable resource>)); 

也可以自定義位圖的圖標,同時增加圖標到Marker使用IconFactory.recreate()方法,例如縮放位圖:

Icon icon = iconFactory.fromResource(<drawable resource>); 
Icon newIcon = IconFactory.recreate(icon.getId(), Bitmap.createScaledBitmap(icon.getBitmap(), 35, 35, false)); 
相關問題