title: Google map markers appearing on wrong location on the map
body: <p>I have been working on an android application featuring google maps, I am requesting for coordinates to a node js server and the response is then parsed to double type and when passed to an object of Marker the marker appears on an inaccurate location, I have copied the coordinates from the database and when I pass them direct to the Marker's object, the marker appears on the right location, I also have an alert box displaying the value of the markers as I receive them from the serve and it seems to be displaying the right coordinates, what I think is there is some garbage value with in the variables to which I assign the coordinates or it can be an issue in parsing while i get them in the form of JSON from the server and parse them to double
  I have done a little search but I couldn't find a solution specifically addressing my issue, if I haven't been thorough I am sorry, thank you all in advance for your help.</p>
  
  <p><strong>Here is the code:</strong>
  The code when I receive the coordinates and parse them (via socketIO):</p>
  
  <pre><code>public void on(String functionName, IOAcknowledge ioAck, Object... arguments) {
  
                  if("points_of_interest".equals(functionName)){
  
                  temp=arguments[0].toString();
                  try {
                      JSONObject object=new JSONObject(temp);
                      String idStop=object.getString("route_id");
                      String longt=object.getString("stop_longg");
                      String lat=object.getString("stop_lat");
  
                      lati=Double.parseDouble(lat);
                      lngi=Double.parseDouble(longt);
  
  
  
                  } catch (JSONException e) {
                      // TODO Auto-generated catch block
                      e.printStackTrace();
                  }
                                   }
                              }
  </code></pre>
  
  <p><strong>Now here is the function call that creates the markers in the onCreate method:</strong></p>
  
  <pre><code>      map=((MapFragment) getFragmentManager().findFragmentById(R.id.allBusMaps)).getMap();
  
  
       createStops();
  </code></pre>
  
  <p>Here is the code for createStops() method:</p>
  
  <pre><code>     public void createStops(){
  
       map.clear();
  //   LatLng lhr=new LatLng(31.500794,74.316777);
               LatLng lhr=new LatLng(lati,lngi);
  
  
  
      Marker lahore = map.addMarker(new MarkerOptions().position(lhr).title("busStop"));
      map.moveCamera(CameraUpdateFactory.newLatLngZoom(lhr, 15));
  
   }
  </code></pre>
  
  <p><strong>In the above mentioned case case when I am passing the value through variables this is the output being generated:</strong></p>
  
  <p>But when I pass the values direct to the Marker's object the marker appears on the right locations:</p>
  
  <p>e.g.     LatLng lhr=new LatLng(31.500794,74.316777);</p>