GWeather.Location.get_city_name

### Method

# GWeather Locationget_city_name

#### Declaration [src]

    char*
    gweather_location_get_city_name (
      GWeatherLocation* loc
    )

#### Description [src]

Retrieves the city name for the given location.

For a `GWEATHER_LOCATION_CITY` or `GWEATHER_LOCATION_DETACHED` location, this method is equivalent to `gweather_location_get_name()`.

For a `GWEATHER_LOCATION_WEATHER_STATION` location, this is equivalent to calling `gweather_location_get_name()` on the location’s parent.

For other locations this method will return `NULL`.

#### Return value

Type: `char*`

The city name of the location.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.