mohanadarafe / GuideMe

SOEN 390 | Winter 2020 | Mini Capstone
7 stars 5 forks source link

Outdoor Points of Interest (restaurants) #12 #226

Closed csbduzi closed 4 years ago

csbduzi commented 4 years ago

Pull Request | Outdoor Points of Interest (restaurants) #12

Contents of the PR:

The following PR is containing the implementation for the Point of Interest feature. The feature will be accessible from the two locations, bottom menu and side menu. The Point of Interest is screen containing a list of Places that are surrounding the Concordia campuses. The API is returning the 20 closest Points Of Interest based on the preset search radius for SGW and Loyola. The user will be able to navigate through the lists of both campus and press on the items to view the information corresponding to that place. Additionally, the user will have be able to get directions to that specific point of interest.

NOTICE

With implementation of the Google Places API, @AlainJobs and I have realized this feature require A LOT more API calls to request all the proper information and pictures (Up to 40 times more compared to the Calendar or Directions API). The reason is because the HTTP URLs for the displaying of the pictures takes in an unique argument (_photoreference) in its link that comes from each json Object retrieved from the first (basic information) API fetch. The same logic is applied to retrieve the the website info and phone number info. The HTTP URL is taking a unique (_placeId) argument in the link which is requiring a third API fetch for the requesting of the detail information json Objects.

In conclusion, good chunks of codes,

were commented out to prevent excessive calls to the API.

Since, these lines are not mandatory to primary functioning of the feature, the code will be left as is to reduced the number of API calls to a minimum and will be un-commented out if ever having to present in a demo all the features of this implementation.

Extension

A future extension could also be to display other Points Of Interest such as shopping places, etc

How to test

  1. Run the app using the command expo start

Scenario 1: to get to the Points of Interest screen

  1. Once on the main screen (map view), press on the arrow up button on the left corner of the bottom menu.

  2. Land on the Points of Interest screen and scroll through the list of items.

  3. Press navigate through the SGW and Loyola campus tabs with the tab button

  4. Press on one of the tiles of the list, you will land on the detail page of the place

  5. Press on the button Get Directions to navigate to the Double Search page.

  6. After the Double Search screen has been prompted, you will be able to press on the button View Route to obtain the direction to your desired point of interest.

Scenario 2: to get to the Points of Interest screen

  1. Once on the main screen (map view), press on the burger menu button on the left corner of the search bar.

  2. The Side Menu will pop out from the left side of the screen, and will present a menu with 6 tabs. Press on the _Points of Interest tab.

  3. Land on the Points of Interest screen and scroll through the list of items.

  4. Press navigate through the SGW and Loyola campus tabs with the tab button

  5. Press on one of the tiles of the list, you will land on the detail page of the place

  6. Press on the button Get Directions to navigate to the Double Search page.

  7. After the Double Search screen has been prompted, you will be able to press on the button View Route to obtain the direction to your desired point of interest.

GitHub Issues

This PR covers the following issues:

14 US34 - As a user, I would like to see the nearest outdoor points of interest

15 US35 - As a user, I would like to get the direction to the chosen nearest point of interest

29 US36 - As a user, I would like to see a detailed description of the selected places

GIFS

ezgif-2-f4090325be24

csbduzi commented 4 years ago

Great job, the page looks good & the API's are very responsive. Great implementation of the route stack logic. I left one or two comments regarding your code (not the other features).

That being said, I detected a bug. Steps to reproduce:

  1. Go to nearby interest page
  2. Select any place
  3. Get directions
  4. Press on start
  5. Go to the preference menu
  6. Slide back down & the screen is switched to the navigation Map while it should be in the directions Map

Once that is fixed, we in business 🤝

Spot on, it was a missing screen in the nearbyInterestStack. It's fixed now!

mohanadarafe commented 4 years ago

Well done!