title: Image not load in Google map marker
body: <p>I am trying to load image in Google map that I have fetched from Firebase Storage in marker window. The thing is, when I try to load it with Glide or Picasso, it's not loading in Google map. Every log I have in the code is visible in logcat. Am I doing something wrong here?</p>
  
  <p>Here is my code </p>
  
  <pre><code>public class MapInfoWindowAdapter implements GoogleMap.InfoWindowAdapter {
  
      Context context;
      LayoutInflater inflater;
      private DatabaseReference mDatabase;
      private StorageReference storageReference;
      private Chalet chalet;
      private boolean query;
      private ImageView img;
      private String lat;
      private String log;
  
      public MapInfoWindowAdapter(Context context, LayoutInflater inflater) {
          this.context = context;
          this.inflater = inflater;
      }
  
      @Override
      public View getInfoWindow(Marker marker) {
          return null;
      }
  
      @Override
      public View getInfoContents(final Marker marker) {
  
          mDatabase = FirebaseDatabase.getInstance().getReference().child("chalets");
          storageReference=FirebaseStorage.getInstance().getReference();
  
          inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
          View v = inflater.inflate(R.layout.marker_tag,null);
  
         final LatLng latlng = marker.getPosition();
         Double doubleLat = latlng.latitude;
  
           lat = String.valueOf(latlng.latitude);
           log = String.valueOf(latlng.longitude);
          Log.i("MarkerPostion",lat);
  
          img = (ImageView) v.findViewById(R.id.chaletImg);
  
         // final TextView textView = (TextView) v.findViewById(R.id.markerText);
          final Semaphore semaphore = new Semaphore(0);
         mDatabase.addValueEventListener(new ValueEventListener() {
  
              @Override
              public void onDataChange(DataSnapshot dataSnapshot) {
  
                  Log.i("MarkerPostion","112211");
                  for (DataSnapshot snapm: dataSnapshot.getChildren()) {
                      Log.i("MarkerPostion",snapm.child("latitude").getValue().toString());
                      Log.i("Key",snapm.getKey());
                      if ( lat.equals(snapm.child("latitude").getValue().toString()) &amp;&amp; log.equals(snapm.child("longitude").getValue().toString()) ){
                          chalet = snapm.getValue(Chalet.class);
                          Log.i("MarkerPostion","9999");
                          break;
                      }
                  }
  
                  storageReference = FirebaseStorage.getInstance().getReference().child(chalet.getOwnerID()).child(chalet.getChaletNm()).child("1");
                  storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {
  
                      @Override
                      public void onSuccess(Uri uri) {
                          Picasso.with(context).load(uri).into(img);
                          Log.i("MarkerPostion","2222");
                      }
                  });
              }
  
              @Override
              public void onCancelled(DatabaseError databaseError) {
  
              }
          });       
  
          return v;
      }
  }
  </code></pre>
  
  <p>Here is my XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent" android:layout_height="match_parent"
      android:id="@+id/markerFrame"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"&gt;
  
          &lt;ImageView
              android:id="@+id/chaletImg"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_gravity="center"
              android:adjustViewBounds="true"
              android:scaleType="centerCrop"
               /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>