So far we have learned a lot; now let's use our acquired knowledge and improvise our restro application by implementing the following changes:
To get data from the server, use the http://restro.nalwaya.com/restaurants/find_restaurent_distance.json?latitude=#{latitude}&&longitude=#{longitude}
API.
You have to pass the latitude and longitude with this request, and in return, you will get a list of restaurants in the JSON format. Use this as input and create a view displaying the results.
Use the http://restro.nalwaya.com/restaurants/search.json?city={city_name}
API that will give you a list of restaurants with their latitude and longitude in the JSON format. Use these coordinates to show their location on the map.
Once you are done with this exercise, compare your solution with the one available in the chapter code available with this book.