The project allows the users to search for their next holiday destination and find hotels, bars and restaurants, and tourist attractions in a city of their choice.
The live website can be found here.
The website uses the Google Maps API to find a city and provide the results of the search. Initially the map displays entire Europe, but when a country is selected, then the map zooms in on that country and city searches are limited only to that particular country. If no country is selected or 'All' is selected from the dropdown menu, then the searches may return cities from the entire world.
After selecting a city the map will zoom in on that city and the markers of a desired place type (which can be changed by clicking on any of the filters) will be displayed both on the map and the results table.
Clicking on a marker, either on a map or in results table, will provide more information about the place (address, telephone, rating and website).
- HTML
- CSS
- Bootstrap 4.3.1: grid and responsive design
- Javascript
- Google Maps API
- Google Fonts: Roboto, Montserrat
- Font Awesome icons
- use
fitBounds()
to calculate the country zoom level automatically - customize the map markers for different place types
- results pagination (more results)
Manual testing has been performed in order to ensure everything works as intended (input fields, search results, buttons, links, responsiveness). The website was tested on different web browsers (Firefox, Chrome, Opera) on desktop and mobile devices. The following websites were used to validate the code:
There were some issues I've encountered as I wasn't yet aware of the limitations of Google Maps API. I tried to limit the city search functionality only to European countries, only to find out that the ComponentRestrictions
interface accepts only up to 5 country code strings. link
The other limitation is up to 20 results per query, which can be increased to max 60 results with Pagination. link
The website was deployed on GitHub pages from the master branch.
To run the code locally download the project, unzip it and open the index.html
file.
Or paste the following code into terminal to clone the repository: git clone https://github.com/m-sbt/project2.git