当前位置: 动力学知识库 > 问答 > 编程问答 >

Rounded google maps custom marker android

问题描述:

I want to add a custom marker that looks like this:

How can I achieve this? I am using Glide and Picasso libraries.

网友答案:

if you are using Picasso to download/load the pictures, then you can use a Transformation to intercept the bitmap and make it rounded. The callback gives you the bitmap to transform. You can easily use a BitmapShader with the TileMode.CLAMP to make it round

网友答案:

To add a custom marker in your map you can use this line of code:

MarkerOptions markerOptions = new MarkerOptions().icon(yourBitmap);
网友答案:

You can use MarkerOptions

MarkerOptions markerOptionsObj = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.Your_Icon));

https://developers.google.com/maps/documentation/android-api/marker

分享给朋友:
您可能感兴趣的文章:
随机阅读: