Here is a link to the site http://tinylandmarks.herokuapp.com/
Here is a link to the github https://github.com/NathanSass/LocalHUNT
This project holds a special place in my heart, because I cut my teeth working with APIs and writing well organized MVC JS on this app. I recently revised it because I wanted to improve the flow of the app and get it up on heroku so I could begin beta testing it.
After putting the app aside for a month, it was extremely easy to hop back on and figure out the codebase. This is my first experience going back and re-reading my own code. I remember one of my previous challenges was dealing with the asynchronous processes relating to geolocation.
I wanted to make 2 major changes to the app:
1. Instead of the user clicking on the map and a location to add a marker. The marker would automatically be dropped where the user was and he/she could drag it somewhere else if he/she pleased.
- I wanted to make this change because I felt like most of the time a user would see something cool and want to immediately mark it. Chances are, the user would not know exactly where they were. Also, its more simple and I think it points to the on-the-go nature that I wanted for this app.
- This was rather difficult because I had to use nested click listeners to listen for when the markers started to be dragged and when it was done being dragged. When the marker was done being dragged, I would send a JSON object back to ruby land and tell sinatra to update the marker's location. I had errors if a marker was dragged and repositioned multiple times, so I had to remove click listeners to account for that.
- I am not the most proud of this method, but I think it is actually reasonably clear.
2. The other thing I wanted to change was have the user input the marker data in a form field instead of in a JS alert. I wanted to have only one button, but just change its function using JS.
The first time you click on the button, it shows a form field, The second time you click, it triggers the creation of a new marker and then hides the form field.
Overall, I like how this project is coming along. If I were to add functionality, it would be to allow a user to delete a marker that was dropped on that session. It shouldn't be too tough to implement.