title: How to fetch latitude and longitude in google maps?
body: <p>I stored some lattitude and longitude on google map now i want add on google</p>
  
  <p>I tried to read lattitude and longitude into <code>array</code> than i tried to read the <code>array</code> into google map but throw that the <code>array</code> is <em>unitialized</em></p>
  
  <pre><code>JsonArrayRequest arrayRequest = new JsonArrayRequest(Request.Method.POST, url, null, new Response.Listener&lt;JSONArray&gt;() {
              @Override
              public void onResponse(JSONArray response) {
  
                  if (response.length() &gt; 0) {
                      phone = new String[response.length()];
                      liti = new double[response.length()];
                      longt = new double[response.length()];
                      for (int i = 0; i &lt; response.length(); i++) {
                          try {
                              JSONObject jsonObject = response.getJSONObject(i);
                              phone[i] = jsonObject.getString("phone").toString();
                              liti[i] = ((double) jsonObject.getDouble("latitude"));
                              longt[i] = ((double) jsonObject.getDouble("longitude"));
                              Toast.makeText(context, longt[i]+"", Toast.LENGTH_SHORT).show();
                          } catch (JSONException e) {
                              Toast.makeText(context, e.getMessage() + "", Toast.LENGTH_SHORT).show();
                              e.printStackTrace();
                          }
  
                      }
                  }
              }
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
  
              }
          });
          RequestQueue requestQueue = Volley.newRequestQueue(context);
          requestQueue.add(arrayRequest);
  </code></pre>
  
  <p>i want to add these lititude and longitude onto google map</p>