title: Placing markers on map using the latitude and longitude values extracted from MYSQL DB using JSON in android
body: <p>I have a set of lat and lon values in MYSQL DB. I retrieved it in android app using JSON (retrieved from PHP code) and I am able to show those locations on map. But I donot know how to place markers on those locations. Please help me.</p>
  
  <p>Following is my code :</p>
  
  <pre><code>try {
  
      HttpClient client = new DefaultHttpClient();
      URI website = new URI("http://192.168.1.15/latlonret1.php");
      HttpGet request = new HttpGet();
      request.setURI(website);
      HttpResponse response = client.execute(request);
      in = new BufferedReader(new InputStreamReader(response
              .getEntity().getContent()));
      StringBuffer sb = new StringBuffer("");
      String l = "";
      String nl = System.getProperty("line.separator");
  
      while ((l = in.readLine()) != null) {
          sb.append(l + nl);
      }
      in.close();
      data = sb.toString();
      // return data;
  } catch (Exception e) {
      Log.e("log_tag", "Error converting result " + e.toString());
  }
      try {
  
          JSONArray jArray = new JSONArray(data);
  
  
          for (int i = 0; i &lt; jArray.length(); i++) {
              JSONObject json_data = jArray.getJSONObject(i);
              JSONObject json_data1 = jArray.getJSONObject(i);
  
  
              returnString =json_data.getString("lat") + "\n";
              returnString1 =json_data1.getString("lon") + "\n";
              System.out.println(returnString);
              System.out.println(returnString1);
        }
   Intent viewIntent =new Intent(Androidmap.this,Mapview.class);
  
   Bundle bundle = new Bundle();
   bundle.putString("stuff", returnString); 
   bundle.putString("stuff1", returnString1); 
   viewIntent.putExtras(bundle);
  
   startActivity(viewIntent);
      }
  </code></pre>