How to Set background image of a custom google map

2019-06-23 18:35发布

Here is the Custom Map Marker icon and on the above **white round** part i have to set imageIt 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

I have a custom image for Google Marker but another image i have to set on its background.

Is it possible to set background image of a map Marker?

2条回答
神经病院院长
2楼-- · 2019-06-23 19:15

From the answer of @Abx

You can add custom marker like that,

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)));

Thanks to @Abx

查看更多
我想做一个坏孩纸
3楼-- · 2019-06-23 19:18
登录 后发表回答