How to show current weather on the basis of lattitude and longitude?

    Install weather and location module after that use following function to return weather condition on the basis of lattitude and longitude of the place.
    <?php
    function get_weather_condition($lat, $lon) {
     
    $station = weather_get_icao_from_lat_lon($lat, $lon);
     
    $config = _weather_get_config(WEATHER_DEFAULT_BLOCK, 1);
     
    $config = array_merge($config, $station);
     
    $config['real_name'] = $config['name'];
     
    $metar = weather_get_metar($config['icao']);
     
    $weather_block = theme('weather', $config, $metar);
      return
    $weather_block;
    }
    $lat = 53.139457;
    $lon = 113.3480934;
    print
    get_weather_condition($lat, $lon);
    ?>
    5
    Average: 5 (1 vote)