find_nearest_city


Description:

public Location find_nearest_city (double lat, double lon)

Finds the nearest city to the passed latitude and longitude, among the descendants of this.

The given location must be at most a gweather_location_adm1 location. This restriction may be lifted in a future version.

Note that this function does not check if (lat, lon) fall inside this, or are in the same region and time zone as the return value.

Parameters:

this

The parent location, which will be searched recursively

lat

Latitude, in degrees

lon

Longitude, in degrees

Returns:

the city closest to (lat, lon), in the region or administrative district of this.




2022 vala-language.org