I'm trying to add custom marker in an Async Task class inside onPostExecute method. But when I tried the change marker icon ".icon(BitmapDescriptorFactory.fromResource(R.drawable.)", the image that I coppied to drawable folders is not visible in that method. What could be the problem?
@Override
protected void onPostExecute(JSONObject jobject) {
try {
// ...
MarkerOptions bingTrafficMarker = new MarkerOptions()
.position(positionLatLng)
.title(strdescription);
gm.addMarker(bingTrafficMarker);
// ...
}
}