title: Parse data from openweathermap using retrofit2 (using latitude and longitude)
body: <p>I've been trying to get weather using openweathermap api using the users current location (i.e. latitude and longitude), I have correctly retrieved the coordinated but when I run the app I get error 404 in logcat. Here is my code</p>
  <pre><code>private void setData(double latitude, double longitude) {
          Retrofit retrofit = new Retrofit.Builder()
                  .baseUrl(&quot;https://api.openweathermap.org/data/2.5/&quot;)
                  .addConverterFactory(GsonConverterFactory.create())
                  .build();
  
          WeatherAPI api = retrofit.create(WeatherAPI.class);
  
          Integer latitudeInt = (int) latitude;
          Integer longitudeInt = (int) longitude;
  
          Log.v(&quot;LATITUDE STRING&quot;, String.valueOf(latitudeInt));
          Log.v(&quot;LONGITUDE STRING&quot;, String.valueOf(longitudeInt));
  
          Call&lt;WeatherResponse&gt; call = api.getCurrentWeatherData(String.valueOf(latitudeInt), String.valueOf(longitudeInt), appId);
          call.enqueue(new Callback&lt;WeatherResponse&gt;() {
              @Override
              public void onResponse(Call&lt;WeatherResponse&gt; call, Response&lt;WeatherResponse&gt; response) {
  
                  Log.v(&quot;RESPONSE&quot;, String.valueOf(response.code()));
  
                  if (response.code() == 200) {
                      WeatherResponse weatherResponse = response.body();
  
                      assert weatherResponse != null;
                      double temp = weatherResponse.main.getTemp() - 273.15;
                      mainWeather.setText(String.valueOf(temp));
  
                      SimpleDateFormat formatter= new SimpleDateFormat(&quot;yyyy-MM-dd 'at' HH:mm:ss z&quot;);
                      Date currentDate = new Date(System.currentTimeMillis());
                      String dateString = formatter.format(currentDate);
                      date.setText(dateString);
  
                      double wind = weatherResponse.wind.getSpeed() * 2.23;
                      windSpeed.setText(String.valueOf(wind));
  
                      pressure.setText(String.valueOf(weatherResponse.main.getPressure()));
  
                      humidity.setText(String.valueOf(weatherResponse.main.getHumidity()));
  
                      feelsLike.setText(String.valueOf(weatherResponse.main.getFeelsLike()));
  
                      setImage(weatherResponse);
                  }
              }
  
              @Override
              public void onFailure(Call&lt;WeatherResponse&gt; call, Throwable t) {
                  mainWeather.setText(&quot;Error!&quot;);
              }
          });
      }
  </code></pre>
  <p>Here is the WeatherApi interface for querying</p>
  <pre><code>public interface WeatherAPI {
      @GET(&quot;data/2.5/weather?&quot;)
      Call&lt;WeatherResponse&gt; getCurrentWeatherData(@Query(&quot;lat&quot;) String lat, @Query(&quot;lon&quot;) String lon, @Query(&quot;APPID&quot;) String app_id);
  }
  </code></pre>
  <p>I've copied the data class from one of my other weather app that used user's city input to display weather and it worked fine, but this app isn't populating the views at all. and in logcat I get error 404.</p>