将图标设置为图像中地图中的标记 URL

Setting an icon to a marker in a Map from an image URL

我想设置一个图标,从URL地图中的标记。我看到了很多解决方案,但都在展示如何从我们的可绘制文件夹中设置图标。在这里,我想要一些不同的东西,我有一个个人资料图片 URL,我需要将该图片设置为我的标记的图标。请建议我解决这个问题。 她是我的密码:

private void setUpCurrentMarker(LatLng latLng) {
    mMap.clear();
    if (!isUp)
        onSlideViewButtonClick(addressView);
    //LatLng sydney = new LatLng(-34, 151);
    mMap.addMarker(new MarkerOptions()
            .position(latLng)
            .title("Current Location"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
    mMap.animateCamera(CameraUpdateFactory.zoomTo(11));
}
URL url = new URL("Your Image Url");
Bitmap bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
map.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromBitmap(bmp)));

@Rahul Surendram 请尝试以上解决方案希望它能帮助你...!