Guest User

Untitled

a guest
Mar 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. LatLng name1 = new LatLng (6.3490548, -75.5580200);
  2.  
  3. LatLng name2 = new LatLng (6.33, -75.56);... // to create this automatically, only changing name
  4.  
  5. StringRequest strReq = new StringRequest(Request.Method.POST, "http://www.elgeos.com/server/php_tracker_server/markers.php?r_ruta=" + rutaGE + "&jornada=" + jornadaGE, new Response.Listener<String>() {
  6.  
  7. @Override
  8. public void onResponse(String response) {
  9. Log.e("Response: ", response);
  10.  
  11. try {
  12. JSONObject jObj = new JSONObject(response);
  13. String getObject = jObj.getString("saagMRK");
  14. JSONArray jsonArray = new JSONArray(getObject);
  15.  
  16.  
  17. for (int i = 0; i < jsonArray.length(); i++) {
  18. JSONObject jsonObject = jsonArray.getJSONObject(i);
  19.  
  20.  
  21. LatLng name1 = new LatLng(parseDouble(jsonObject.getString(LAT)), parseDouble(jsonObject.getString(LNG)));// Multiply this line only changed the name1 to name2 to name3 automatically
  22. ...
Add Comment
Please, Sign In to add comment