[英]Rounded google maps custom marker android
You can use MarkerOptions
您可以使用MarkerOptions
MarkerOptions markerOptionsObj = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.Your_Icon));
https://developers.google.com/maps/documentation/android-api/marker https://developers.google.com/maps/documentation/android-api/marker
if you are using Picasso to download/load the pictures, then you can use a Transformation to intercept the bitmap and make it rounded. 如果使用Picasso下载/加载图片,则可以使用Transformation截取位图并将其四舍五入。 The callback gives you the bitmap to transform. 回调为您提供要转换的位图。 You can easily use a BitmapShader
with the TileMode.CLAMP to make it round 您可以轻松地使用BitmapShader
与TileMode.CLAMP使其圆
要在地图中添加自定义标记,可以使用以下代码行:
MarkerOptions markerOptions = new MarkerOptions().icon(yourBitmap);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.