Finds the nearest city to the passed latitude and longitude, among the descendants of this.
Supports the use of own filter function to filter out locations.
Geocoding should be done on the application side if needed.
this must be at most a gweather_location_adm1 location. This restriction may be lifted in a future version.
this |
the parent location, which will be searched recursively |
lat |
Latitude, in degrees |
lon |
Longitude, in degrees |
func |
a function to iterate over the locations; the function must return `TRUE` to continue checking for the location, and `FALSE` to filter the location out |
destroy |
to destroy user_data |
user_data |
for customization |
the city closest to ( |