none
What the issue with code RRS feed

  • Question


  •                 var openWeatherMap = 'https://api.openweathermap.org/data/2.5/weather?lat=' + lat[0] + '&lon=' + lat[1] + '&cnt=10&appid=59c8011d1d2c1eb574f4be4f93dfeda7';
                    var openWeatherMapDest = 'https://api.openweathermap.org/data/2.5/weather?lat=' + dest[0] + '&lon=' + dest[1] + '&cnt=10&appid=59c8011d1d2c1eb574f4be4f93dfeda7';

    if (status == 'OK') {
                            //var description = weather.list[0].weather[0].description;
                            //console.log(weatherDest);
                            //console.log(weather);

                            $.get(openWeatherMap, {}).done(function (weather) {
                                //console.log(weather);
                                $.get(openWeatherMapDest, {}).done(function (weatherDest) {
                                    //console.log(weatherDest);
                                    //console.log(result);

                                    result.routes[0].legs[0].start_address = result.routes[0].legs[0].start_address + ", <br /><br /><b>Source Weather Condition</b><br />Weather: " + weather.weather[0].description + "<br />Temperature: " + weather.main.temp + "<br />Humidity: " + weather.main.humidity + "%";
                                    result.routes[0].legs[0].end_address = result.routes[0].legs[0].end_address + ", <br /><br /><b>Destination Weather</b><br />Weather: " + weatherDest.weather[0].description + "<br />Temperature: " + weatherDest.main.temp + "<br />Humidity: " + weatherDest.main.humidity + "%";

                                    allPipelineResults.push(result);
                                });
                            });

    • Edited by TechoNet Tuesday, January 7, 2020 2:50 PM correction
    Tuesday, January 7, 2020 2:41 PM

All replies