### Method

# GWeather Location detect_nearest_city

#### Declaration [src]

    void
    gweather_location_detect_nearest_city (
      GWeatherLocation* loc,
      double lat,
      double lon,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Initializes geocode reversing to find place for (`lat`, `lon`) coordinates.

Calls the callback function passed by user when the result is ready.

The given location must be at most a `GWEATHER_LOCATION_ADM1` location; this restriction may be lifted in a future version.

#### Parameters

`lat` | `double`
| Latitude, in degrees.
`lon` | `double`
| Longitude, in degrees.
`cancellable` | `GCancellable`
| A cancellable instance.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`callback` | `GAsyncReadyCallback`
| Callback function.
| The argument can be `NULL`.
`user_data` | `gpointer`
| User data passed to `callback`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.