我想为从base64字符串转换为image的drawableBitMap设置边框或笔触。有人可以帮我做到这一点吗?这是我的示例代码:
String base64String = facilitiesOverlayProperties.get(i).getImage();
byte[] decodedString = Base64.decode(base64String, Base64.DEFAULT);
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
BitmapDrawable bitmapDrawable = new BitmapDrawable(map.getContext().getResources(), Bitmap.createScaledBitmap(decodedByte, 26, 26, false));
mapMarker.setIcon(bitmapDrawable);
由于我不知道如何创建边框或笔触的代码仍然不存在。
答案 0 :(得分:0)
您可以使用以下方法在位图周围制作圆形边框:
//mMap is your GoogleMap Refrence
mMap.addCircle(new CircleOptions()
.center(new LatLng(latitude, longitude)).radius(10)
.strokeColor(0x220000FF)//stroke color
.strokeWidth(5)
.fillColor(0x220000FF));//your fill colour