calblueprint / ace-ny

4 stars 0 forks source link

[feat] Remove all markers when a project is selected #20

Open itsliterallymonique opened 4 days ago

itsliterallymonique commented 4 days ago

This week, you will be removing all markers when the target project is selected, except for the marker of the target project! There are two different ways a user can select a project:

  1. Click on the specific project pin (marker) of the target project
  2. Direct Search / Filter and select the target project from a list of projects listed on a modal (this has not yet been implemented)

You will be making a single function that can be used for both methods and then implementing this function for (1) the user selects a specific project marker. To do this, you will be making the function in the Google Maps API folder (apis >> maps) Here is what you will need to do:

  1. Create a function in the Google Maps API folder that will hide all pins but the target marker selected by the user a. markers should be identified by their project_id (make sure ethan fixes this in his PR before you start!) b. make sure you don’t delete the marker – simply just hide it. c. Here is some documentation that can help with your function! https://developers.google.com/maps/documentation/javascript/examples/marker-remove
  2. When a project pin is clicked on, run the function you made using a Simple Click Event a. You can use simple click events: https://developers.google.com/maps/documentation/javascript/examples/event-simple b. Note: you will probably need to combine your function with Ethan’s function in his sprint this week

You are doing such a great job Julee!! I appreciate all your hard work so so much <3 !