You are here

function _weather_get_lat_long in Weather 5

Same name and namespace in other branches
  1. 5.6 icao_codes.inc \_weather_get_lat_long()
1 call to _weather_get_lat_long()
_weather_sunrise_sunset in ./weather.module
Internal helper function to calculate the sunrise and sunset times for a given location

File

./icao_codes.inc, line 58

Code

function _weather_get_lat_long($wanted_icao) {
  $icao_codes = _weather_setup_icao_codes();
  foreach ($icao_codes as $country => $data) {
    foreach ($data as $icao => $info) {
      if ($icao == $wanted_icao) {
        return $info;
      }
    }
  }
}