title: How to add search place image in google map marker in android
body: <p>My Concept is that, when search place in google map this place image is add in marker, marker is image view, i am use serch location code from this link <a href="http://wptrafficanalyzer.in/blog/android-geocoding-showing-user-input-location-on-google-map-android-api-v2/" rel="nofollow">http://wptrafficanalyzer.in/blog/android-geocoding-showing-user-input-location-on-google-map-android-api-v2/</a>
  and in this code use owen marker that is image view. so how i can add image </p>
  
  <p>public class GeocoderTask extends AsyncTask>{</p>
  
  <pre><code>    @Override
      protected List&lt;Address&gt; doInBackground(String... locationName) {
          // Creating an instance of Geocoder class
          Geocoder geocoder = new Geocoder(getBaseContext());
          List&lt;Address&gt; addresses = null;
  
          respo=myServiceToHttp.makeServiceCall("https://maps.googleapis.com/maps/api/place/textsearch/json?query="+addresses+"&amp;key=Your Server KEy", MyServiceToHttp.GET);
          System.out.println("MyGeocoderTask.doInBackground()------Image----&gt;"+respo);
  
          try {
  
              String placeid=null;
  
              JSONObject jsonObject=new JSONObject(respo);
  
              JSONArray array=jsonObject.getJSONArray("results");
              //System.out.println("GeocoderTask.doInBackground()----------&gt;"+array);
  
              for (int j = 0; j &lt; array.length(); j++) {
  
                  JSONObject jsonObject2= array.getJSONObject(j);
  
                  placeid=jsonObject2.getString("place_id");
  
                  System.out.println("GeocoderTask.doInBackground()------PlaceID--&gt;"+placeid);
  
                  respo2=myServiceToHttp.makeServiceCall("https://maps.googleapis.com/maps/api/place/details/json?placeid="+placeid+"&amp;key=Your Server KEy", MyServiceToHttp.GET);
  
                  System.out.println("Response2--&gt;&gt;&gt;&gt;" +respo2);
              }
  
  
          } catch (JSONException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
  
  
  
          try {
  
  
              // Getting a maximum of 3 Address that matches the input text
              addresses = geocoder.getFromLocationName(locationName[0],4);
  
  
          }catch (IOException e) {
              e.printStackTrace();
          }
          return addresses;
      }
  
  
      @Override
      protected void onPostExecute(List&lt;Address&gt; addresses) {
  
          if(addresses==null || addresses.size()==0){
              Toast.makeText(getBaseContext(), "No Location found", Toast.LENGTH_SHORT).show();
          }
  
          // Clears all the existing markers on the map
          googleMap.clear();
  
          // Adding Markers on Google Map for each matching address
          for(int i=0;i&lt;addresses.size();i++){
  
  
              Address address  = (Address) addresses.get(i);
  
              // Creating an instance of GeoPoint, to display in Google Map
              latLng = new LatLng(address.getLatitude(), address.getLongitude());
  
  
               String addressText = String.format("%s, %s, %s,%s",
                         address.getMaxAddressLineIndex() &gt; 0 ? address.getAddressLine(1) : "",
                         address.getThoroughfare(),
                          // Locality is usually a city
                          address.getLocality(),
                          // The country of the address
                          address.getCountryName());
  
              marker = new MarkerOptions();
              marker.position(latLng);
              marker.title(addressText);
  
  
              //googleMap.addMarker(marker);
  
              // Locate the first location
              if(i==0)
                  googleMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));
          }
  
  
  
      }
  }
  </code></pre>