如何设置自定义谷歌地图标记的背景图像?

时间:2015-11-20 05:36:23

标签: android google-maps background-image google-maps-markers

Here is the Custom Map Marker icon and on the above **white round** part i have to set image It is one of the image coming for Webservice which i need to set background of the marker i mean to set on the **white round** part

我有Google Marker的自定义图片,但我必须在其背景上设置另一张图片。

  

是否可以设置地图标记的背景图像?

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:1)

来自@Abx的回答

您可以添加自定义标记,

googleMap.addMarker(new MarkerOptions()
            .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_marker_me))
            .anchor(0.5f, 1.0f) // Anchors the marker on the bottom left
            .position(new LatLng(latitude, longitude)));

感谢@Abx