Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented Google Map (New Version) in Apartment Page #357

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

CasperL1218
Copy link
Contributor

Summary

This pull request is the first step toward implementing the Google Map & distance from campus information for the Apartment page.

Google Map:

  • implemented Google Map with default centered at the apartment location (latitude, longitude)
  • implemented apartment icon marker fixed at the apartment coordinate
  • allow user interactions (expand, drag and move, zoom in/out)

Location information:

  • implemented display of apartment address
  • implemented display of distance (time required) from campus via walking/driving

Test Plan

Location section and Google Map
Screenshot 2024-03-17 at 14 44 03
Google Map drag and move
Screenshot 2024-03-17 at 14 46 01
Google Map zoom in
Screenshot 2024-03-17 at 14 46 21
Google Map zoom out
Screenshot 2024-03-17 at 14 46 30
Google map full-screen expansion
Screenshot 2024-03-17 at 14 46 39
Google Map drag and move, zoom in/out (full-screen)
Screenshot 2024-03-17 at 14 46 48

Notes

*Note: the time required for walking/driving to campus is currently hardcoded to 0

Future Plans

  • Implement markers & titles for important campus landmarks (e.g., Arts Quad, Eng. Quad)
  • Implement modal design for map expansion (instead of the current full-screen expansion)

@dti-github-bot
Copy link
Member

dti-github-bot commented Mar 17, 2024

[diff-counting] Significant lines: 621.

Copy link
Member

@kea-roy kea-roy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

This is a really nice implementation of the map. The front-end design looks great on large and small screens, adapting correctly to the page layout even for mobile devices. It looks nearly identical to the Figma design, so great work!

Even though the design is really good, I noticed a few things that could be improved.

  1. The pin in the Figma design also has a small red ellipse below the pin, but the SVG file you used doesn't include that ellipse. You could consider updating the SVG file used to include the ellipse or check with the designers if the red ellipse is needed.
S
  1. Remove console.log command in MapInfo.tsx: This prints the API key to the console. While good for testing, this is unnecessary and it is probably better to omit it from the console for security reasons.
[MapInfo.tsx]

40:  console.log(process.env.GOOGLE_MAP_API_KEY);
  1. Improving the documentation of your code, for instance adding a doc comment for your MapInfo component, just to make the code easier to understand.
[MapInfo.tsx]

32: // add documentation here
33: export default function MapInfo({

Overall, these are minor changes and you did a great job!

- Update apartment icon pin image
- Remove development console log message
- Added component documentation for MapInfo component
kea-roy
kea-roy previously approved these changes Mar 20, 2024
- Implemented map modal component
- Removed driving time info from default map
- Added landmark distance info to location information
- Added documentation for map modal component

Future tasks
- Implement location info for modal map (landmarks, driving/waling time)
- Implement recenter button functionality
- Decrease marker size for apartment/landmarks to fit design
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants