BeerWithMe/beer-finderWeb — pull request #83 by lpappone (2014-10-08 21:49:37+00:00)
Title: begin adding location data to recommendations

This gets as far as saving the user's location when they get to the homepage, and sending that into db.generateRecommendations. It's set as an object in there, and the function still works fine as is, just doesn't use the location data. I had to change the http request to POST to get the data sent.

If the user has an old browser or refuses to allow location services, the latitude and longitude properties in local storage are set to 'undefined', as a string. This is better than leaving the properties unset, because we can just check for undefined values rather than dealing with errors when the computer doesn't find something or ends up with the wrong number of arguments being passed to some function.