TheDevPath / Navi

Open Source Project for Grow with Google Udacity Scholarship Challenge - Navigation app using offline first strategy and google maps api - To get started please refer to the README.md - CONTRIBUTING.md and the project Wiki
https://navi-rocks.herokuapp.com/
MIT License
53 stars 63 forks source link

Fix location not clearing #233

Closed steveone closed 6 years ago

steveone commented 6 years ago

Issue Number: 226

Issue Description: If you click on multiple points of the map, each location will get a pin without you hitting "save" on the pins. The expected behavior is that one pin will be created, and if you don't hit "save" the pin will be removed when you click elsewhere on the map.

Summary of solution:

  1. Added "unSavedMarker" to components local state to track unsaved markers
  2. When a new marker is created, the old marker is removed

Can this issue be closed?

Additional code needed to clear "unSavedMarker" in the state when a marker is successfully saved, that feature is throwing an error (in Chrome Canary) so testing was not possible

Should any new issues be added as a result of this solution?

Saving a marker throws an error Uncaught (in promise) TypeError: Failed to fetch xhr.js....

screen shot 2018-03-12 at 9 02 35 pm

Have you named your branch in a descriptive way? Remember to name your branch in a unique and descriptive manner in order to properly reflect the issue or feature.

Thanks for contributing!