Issue
I am using a mapview with Google Maps and adding markers to the map using following code:
googleMap.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(getResources().getIdentifier(iconFileName, "drawable", this.getActivity().getPackageName()))));
Is there a more resource-friendly way of doing this?
Solution
What about this code??
googleMap.addMarker(new MarkerOptions().position(currentpos)
.title("Marker")
.snippet("My marker.")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.mark_start)));
Answered By - Lal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.