Books and coffee are two very compatible things. If you think about it, a nice cup of a hot beverage and a book are two amazing things to have together.
In this exercise, let's create an app to save both bookstores and coffee places and display them. You could even use Google Maps to display a path from one place to the other.
💡 Hint: To accomplish this new challenge, feel free to follow the Google Maps & Express, the previous lesson.
- Fork this repo
- Clone this repo
-
Upon completion, run the following commands:
git add . git commit -m "done" git push origin master
-
Create Pull Request so your TAs can check up your work.
This exercise will help you to:
- Practice Google Maps API integration with an app
- Add location properties in your models as GeoJSON
- Display content from the database in a map
In models
folder, create a new model place.js
. For now, this model will have:
- name,
- type: coffee shop, bookstore
- timestamps
In this iteration, you should create full CRUD on place.js
model - to be able to create, update, delete and display all the places you save in the database. You will have to create routes and corresponding views.
- To be able to locate places on the map, you will have to add
location
property to its model (refer to the previous lesson if necessary); - Add Location fields to form(s) - create and update
- Get Google Maps API Key
- Add Google Maps to the view(s) that will display the map
- Show places on the map & add markers to show places’ locations
Happy coding! ❤️