I am trying to get the google maps api places to work. I found a NPM that makes it easy to get it connected to node.
https://www.npmjs.com/package/googleplaces
I downloaded the npm and added the api key in the config.js file like it said. Then in my main.js file which is basically the server. I do
const googleplaces = require("googleplaces");
parameters = {
location: [60.164315, 24.936667],
types: "restaurant"
};
googleplaces.placeSearch(parameters, function (error, response) {
if (error) throw error;
assert.notEqual(response.results.length, 0, "Place search must not return 0 results");
});
I get a error of : TypeError: googleplaces.placeSearch is not a function
I checked the node module and cant figure out whats wrong.
via Masnad Nihit
No comments:
Post a Comment