Methods
(static) animateMarker()
Sets the animation and icon properties for the map marker.
- Source:
(static) createMarkers()
Creates map markers.
- Source:
(static) displayTweets()
Adds tweets inside the header above the map
- Source:
(static) getTweets() → {object}
Sends a GET request to api.php which accesses the Twitter API and returns JSON data.
- Source:
Returns:
- JSON of the user's timeline
- Type
- object
(static) getYelpTemplate() → {string}
Matches the icon to diamond rating and formats html for the hotel image and review snippet.
- Source:
Returns:
- HTML containing hotel name, diamond rating, image, and review.
- Type
- string
(static) init()
Displays a Google Map and adds resize event listener.
- Source:
- See:
(static) loadContent()
Make Yelp & Twitter API requests through a Promise
- Source:
(static) setInfoWin()
Gets the content or reads already set content for the infoWindow.
Sets currentLocation, and creates a click event listener.
Gets the hotel's recent tweets and inserts them into the page.
Centers map on marker and pans map down on small screens.
- Source: