Skip to content

Instantly share code, notes, and snippets.

@gregorypierce
Created January 10, 2015 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gregorypierce/95ba27df6f2db207b519 to your computer and use it in GitHub Desktop.
Save gregorypierce/95ba27df6f2db207b519 to your computer and use it in GitHub Desktop.
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