Created
January 10, 2015 04:11
-
-
Save gregorypierce/95ba27df6f2db207b519 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.placeSearch = function( options ) | |
{ | |
parameters = { | |
location : [ options.lat, options.lon ], | |
types: options.placeType | |
} | |
googlePlaces.placeSearch( | |
parameters, | |
function( error, response ) | |
{ | |
if (error) | |
{ | |
sails.log.error('Place search failed due to error' + error.message ); | |
throw error; | |
} | |
else | |
{ | |
return response.results; | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment