Issue
This is the code below which i am using.
mMap is the instance of GoogleMap
my question is how can i load URL of the image instead of R.drawable.ic_map_barber
I spend my lot of time but not getting any solution. please help me to solve this problem
DrawMarker.getInstance(getActivity()).draw(mMap, new LatLng(lat, Long), R.drawable.ic_map_barber, BarberName);
Solution
draw/add the marker after you obtain the bitmap :
URL url = new URL("http://imagepath/store/url");
Bitmap bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
map.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromBitmap(bmp)));
Answered By - Joel Wembo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.