title: image not loading from URL in custom infoWindow using Picasso image loading library in android
body: <p>I am trying to load an image from the URL in custom infoWindow when the user click on the marker. I was able to load the other details but the image is not loading int it. i'm using Picasso library to do this for me. I have search many related topics and see the solutions but was not able to understand which solution to apply to solve my problem. I am using an web service call to get the required data.</p>
  
  <p>This is my code:</p>
  
  <pre><code>  @Override
          public View getInfoContents(Marker arg0) {
  
              //marker.showInfoWindow();
              return null;
          }
  
          @Override
          public View getInfoWindow(Marker arg0) 
          {
  
              View v = getLayoutInflater().inflate(R.layout.map_infowindow, null);
  
  
               for(int i=0 ; i&lt;lstMain.size();i++)
                  {
                      Pojo b=lstMain.get(i);
                      double slat= Double.parseDouble(b.getLatitude());
                      double slng= Double.parseDouble(b.getLongitude());
  
                      double lat= Math.round(slat*100000.0)/100000.0;
                      double lng= Math.round(slng*100000.0)/100000.0;
  
                      String s1=String.valueOf(lat);
                      String s2=String.valueOf(lng);
  
                      Log.v("comparing latilongi pojo===&gt;", lat+" , "+lng);
                      Log.v("comparing latilongi marker===&gt;", Clickedlatitude+" , "+Clickedlongitude);
  
                      if(s1.equals(String.valueOf(Clickedlatitude)) &amp;&amp; s2.equals(String.valueOf(Clickedlongitude)))
                      {
                          txtDname=(TextView)v.findViewById(R.id.infoDoctorName);
                          txtDspe=(TextView)v.findViewById(R.id.infoDoctorSpe);
                          txtDaddress=(TextView)v.findViewById(R.id.infoDoctorAddress);
                          imgUrl=(ImageView)v.findViewById(R.id.infoDoctorImage);
                          String url=b.getPhotoURL();
  
                          txtDname.setText(b.getDoctorName());
                          txtDspe.setText(b.getSpecialization());
                          txtDaddress.setText(b.getAddress1()+" , "+b.getAddress2());
  
  
                          Picasso.with(MapActivity.this)
                          .load(url)
                          .placeholder(R.drawable.ic_launcher)
                          .error(R.drawable.ic_launcher).resize(50, 50)
                          .into(imgUrl);
  
  
                      }
  
                  }
              return v;
          }
  </code></pre>
  
  <p>I have already seen these solutions, But not understanding exactly what will solve my problem:</p>
  
  <p><a href="https://stackoverflow.com/questions/16662484/why-custom-infowindow-of-google-map-v2-not-load-url-image">Why Custom InfoWindow of google map v2 ,Not load url Image?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/14334390/android-google-maps-apiv2-infowindow-and-markers">Android Google maps APIv2 InfoWindow and Markers</a></p>
  
  <p><a href="https://stackoverflow.com/questions/18938187/add-an-image-from-url-into-custom-infowindow-google-maps-v2">Add an Image from url into custom InfoWindow google maps v2</a></p>