title: adding multiple marker from json
body: <p>I'm trying to add multiple marker on google map v2 from json 
  here is what i tried so far , but cant get single marker on map.</p>
  
  <p>what i feel like I'm making mistake on adding marker , 
  should i add another method for adding marker or that's should go in map ready 
  or should i use two separate activity one for google map and another for JSON and if you can suggest some correction over here .  </p>
  
  <pre><code>public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
      HashMap&lt;String, Double&gt; resultp;
      private String TAG = MapsActivity.class.getSimpleName();
      private ProgressDialog pDialog;
      private static String url = "https://api.myjson.com/bins/1an69r";
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; placeList;
      ArrayList&lt;HashMap&lt;String, Double&gt;&gt; Coordinate;
      private GoogleMap mMap;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_maps);
          new GetPlace().execute();
         placeList = new ArrayList&lt;&gt;();
          Coordinate = new ArrayList&lt;&gt;();
           resultp = new HashMap&lt;&gt;();
          SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                  .findFragmentById(R.id.map);
          mapFragment.getMapAsync(this);
  
      }
      private class GetPlace extends AsyncTask&lt;Void, Void, Void&gt; {
  
              @Override
              protected void onPreExecute() {
                  super.onPreExecute();
  
                  pDialog = new ProgressDialog(MapsActivity.this);
                  pDialog.setMessage("wait bro");
                  pDialog.setCancelable(false);
                  pDialog.show();
  
              }
  
              @Override
              protected Void doInBackground(Void... arg0) {
                  HttpHandler sh = new HttpHandler();
  
  
                  String jsonStr = sh.makeServiceCall(url);
  
                  Log.e(TAG, "Response from url: " + jsonStr);
  
                  if (jsonStr != null) {
                      try {
                          JSONObject jsonObj = new JSONObject(jsonStr);
  
                          // Getting JSON Array node
                          JSONArray places = jsonObj.getJSONArray("places");
  
                          // looping through All places
                          for (int i = 0; i &lt; places.length(); i++) {
                              JSONObject c = places.getJSONObject(i);
  
                              String id = c.getString("id");
                              String name = c.getString("name");
                              String city = c.getString("city");
                              String needle = c.getString("needle");
                              Double lat = c.getDouble("lat");
                              Double lng = c.getDouble("lng");
                              String rating = c.getString("rating");
  
  
                              // tmp hash map for single contact
                              HashMap&lt;String, String&gt; place = new HashMap&lt;&gt;();
  
                              // adding each child node to HashMap key =&gt; value
                              place.put("id", id);
                              place.put("name", name);
                              place.put("city", city);
                              place.put("needle", needle );
                              place.put("rating",rating);
                              placeList.add(place);
                              //adding to new hashmap 
                              HashMap&lt;String, Double&gt; lace = new HashMap&lt;&gt;();
                              lace.put("lat",lat);
                              lace.put("lng",lng);
                              // adding contact to place list
                              Coordinate.add(lace);
  
                          }
                      } catch (final JSONException e) {
                          Log.e(TAG, "Json parsing error: " + e.getMessage());
                          runOnUiThread(new Runnable() {
                              @Override
                              public void run() {
                                  Toast.makeText(getApplicationContext(),
                                          "Json parsing error: " + e.getMessage(),
                                          Toast.LENGTH_LONG)
                                          .show();
                              }
                          });
  
                      }
                  } else {
                      Log.e(TAG, "Couldn't get json from server.");
                      runOnUiThread(new Runnable() {
                          @Override
                          public void run() {
                              Toast.makeText(getApplicationContext(),
                                      "Couldn't get json from server. Check LogCat for possible errors!",
                                      Toast.LENGTH_LONG)
                                      .show();
                          }
                      });
  
                  }
  
                  return null;
              }
  
              @Override
              protected void onPostExecute(Void result) {
                  super.onPostExecute(result);
                  // Dismiss the progress dialog
                  if (pDialog.isShowing())
                      pDialog.dismiss();
  
  
              }
  
          }
  
      **@Override
      public void onMapReady(GoogleMap googleMap) {
          mMap = googleMap;
     for( int i=0;i&lt;Coordinate.size();i++)
          {
  
             resultp = Coordinate.get(i);
            Double lAT = resultp.get("lat");
              Double lNG = resultp.get("lng");
  
              //Plot latitude and longitude in the map
  
              LatLng lk = new LatLng(lAT,lNG);
  
              googleMap.addMarker(new MarkerOptions().position(new    LatLng(lAT, lNG)));
              Log.e("PlaceLL",lAT+" "+lNG);
  
          }**
      }
  
  }
  </code></pre>