@@ -166,9 +166,7 @@ app.getData = addressInput => {
166166 //Display Content of Story
167167
168168 //console log google api result
169- console . log ( result ) ;
170- //app.filter(result);
171-
169+ //console.log(result);
172170 //console log google api result ends
173171
174172 app . displayStoryContent ( result ) ;
@@ -179,6 +177,7 @@ app.getData = addressInput => {
179177 } ) ;
180178} ;
181179
180+ // filtering the locality/political name to get the actual name of town
182181app . filter = data => {
183182 const arr = data . results [ 0 ] . address_components ;
184183
@@ -226,6 +225,7 @@ app.empty = () => {
226225 $ ( ".weather-details" ) . empty ( ) ;
227226 $ ( ".dateTime-details" ) . empty ( ) ;
228227 $ ( ".composition" ) . empty ( ) ;
228+ $ ( ".popup__left" ) . empty ( ) ;
229229} ;
230230
231231// displaying the data to DOM
@@ -258,6 +258,10 @@ app.displayStoryContent = data => {
258258 />` ) ;
259259 } ) ;
260260 $ ( ".composition" ) . append ( imgContent ) ;
261+ $ ( ".popup__left" ) . append ( `<img src="${
262+ result [ 0 ] . images [ 0 ]
263+ } " alt="Tour photo" class="popup__img" />
264+ <img src="${ result [ 0 ] . images [ 1 ] } " alt="Tour photo" class="popup__img" />` ) ;
261265 }
262266 //Default Data
263267 else {
@@ -280,6 +284,12 @@ app.displayStoryContent = data => {
280284 />` ) ;
281285 } ) ;
282286 $ ( ".composition" ) . append ( imgContent ) ;
287+ $ ( ".popup__left" ) . append ( `<img src="${
288+ defaultData . images [ 0 ]
289+ } " alt="Tour photo" class="popup__img" />
290+ <img src="${
291+ defaultData . images [ 1 ]
292+ } " alt="Tour photo" class="popup__img" />`) ;
283293 }
284294} ;
285295
@@ -355,10 +365,9 @@ app.localWeather = latLong => {
355365 weatherDetails . humidity = result . main . humidity ;
356366 weatherDetails . tempMax = result . main . temp_max ;
357367 weatherDetails . tempMin = result . main . temp_min ;
358- //console.log(result);
359368 //Weather Details
360-
361- $ ( ".story-title-popup" ) . append ( weatherDetails . cityName ) ;
369+ //$(".story-title-popup").append(weatherDetails.cityName);
370+ $ ( ".story-title-popup" ) . append ( cityName ) ;
362371 $ ( ".weather-details" ) . append ( `
363372 <li><strong>Temperature:</strong><br/>${
364373 weatherDetails . currentTemp
0 commit comments