weather-forecast.js
function(lat, lon, done){

    var url = "http://api.met.no/weatherapi/locationforecast/1.8/?lat=" + lat + ";lon=" + lon;

    request(url, function(error, response, body) {

      if (!error && response.statusCode < 400) {

        var $ = cheerio.load(body);
        var nearbyForecasts = closestInstantForecasts($, $("product time"), FORECASTS_COUNT);

        done(nearbyForecasts.map(createForecastItem));

      } else {
        console.error("error requesting met.no forecast");
        done();
      }
    });
  }
function(lat, lon, done){

    var url = "http://api.met.no/weatherapi/locationforecast/1.8/?lat=" + lat + ";lon=" + lon;

    request(url, function(error, response, body) {

      if (!error && response.statusCode < 400) {

        var $ = cheerio.load(body);
        var nearbyForecasts = closestInstantForecasts($, $("product time"), FORECASTS_COUNT);

        done(nearbyForecasts.map(createForecastItem));

      } else {
        console.error("error requesting met.no forecast");
        done();
      }
    });
  }
function ( lat , lon , done ) { var url = "http://api.met.no/weatherapi/locationforecast/1.8/?lat=" + lat + ";lon=" + lon ; request ( url , function ( error , response , body ) { if ( ! error && response . statusCode < 400 ) { var $ = cheerio . load ( body ) ; var nearbyForecasts = closestInstantForecasts ( $ , $ ( "product time" ) , FORECASTS_COUNT ) ; done ( nearbyForecasts . map ( createForecastItem ) ) ; } else { console . error ( "error requesting met.no forecast" ) ; done ( ) ; } } ) ; }
call done with weather forecast results for GPS location lat, lon
call done with weather forecast results for GPS location lat lon