@@ -39,10 +39,10 @@ async function initMap() {
3939
4040 // Create an HTML container.
4141 const content = document . createElement ( 'div' ) ;
42- const titleDiv = document . createElement ( 'div' ) ;
43- const ratingDiv = document . createElement ( 'div' ) ;
44- const addressDiv = document . createElement ( 'div' ) ;
45- const reviewDiv = document . createElement ( 'div' ) ;
42+ const title = document . createElement ( 'div' ) ;
43+ const rating = document . createElement ( 'div' ) ;
44+ const address = document . createElement ( 'div' ) ;
45+ const review = document . createElement ( 'div' ) ;
4646 const authorLink = document . createElement ( 'a' ) ;
4747
4848 // If there are any reviews display the first one.
@@ -54,22 +54,22 @@ async function initMap() {
5454 const authorUri = place . reviews [ 0 ] . authorAttribution ! . uri ;
5555
5656 // Safely populate the HTML.
57- titleDiv . textContent = place . displayName || '' ;
58- addressDiv . textContent = place . formattedAddress || '' ;
59- ratingDiv . textContent = `Rating: ${ reviewRating } stars` ;
60- reviewDiv . textContent = reviewText || '' ;
57+ title . textContent = place . displayName || '' ;
58+ address . textContent = place . formattedAddress || '' ;
59+ rating . textContent = `Rating: ${ reviewRating } stars` ;
60+ review . textContent = reviewText || '' ;
6161 authorLink . textContent = authorName ;
6262 authorLink . href = authorUri || '' ;
6363 authorLink . target = '_blank' ;
6464
65- content . appendChild ( titleDiv ) ;
66- content . appendChild ( addressDiv ) ;
67- content . appendChild ( ratingDiv ) ;
68- content . appendChild ( reviewDiv ) ;
65+ content . appendChild ( title ) ;
66+ content . appendChild ( address ) ;
67+ content . appendChild ( rating ) ;
68+ content . appendChild ( review ) ;
6969 content . appendChild ( authorLink ) ;
7070 } else {
7171 content . textContent =
72- ' No reviews were found for ' + place . displayName + '.' ;
72+ ` No reviews were found for ${ place . displayName } .` ;
7373 }
7474
7575 // Create an infowindow to display the review.
0 commit comments