我正在實施一個GPS跟蹤應用程序,在那個應用程序中我需要設置一個谷歌地圖標記與特定的用戶image.if是否可能?如何在android中設置谷歌地圖標記與用戶圖像?
這可能意味着如何?因爲在Play商店中已經有一些應用有這樣
對不起,我的英語水平。
請幫我有人..
在此先感謝...
我正在實施一個GPS跟蹤應用程序,在那個應用程序中我需要設置一個谷歌地圖標記與特定的用戶image.if是否可能?如何在android中設置谷歌地圖標記與用戶圖像?
這可能意味着如何?因爲在Play商店中已經有一些應用有這樣
對不起,我的英語水平。
請幫我有人..
在此先感謝...
可以使用BitmapDescriptorFactory
加載和創建自定義標記圖標:
new MarkerOptions()
.position(latlng)
.icon(BitmapDescriptorFactory.fromResource(resId))
BitmapDescriptorFactory
聲明:
public static BitmapDescriptor fromResource(int resourceId)
public static BitmapDescriptor fromAsset(String assetName)
public static BitmapDescriptor fromFile(String fileName)
public static BitmapDescriptor fromPath(String absolutePath)
public static BitmapDescriptor fromBitmap(Bitmap image)
可以將Google標記設置爲圖像。你可以在github中找到類似的項目,它具有Google標記作爲圖像。 鏈接是enter link description here
在此鏈接'聚類自定義外觀'是谷歌標記爲圖像。