Giter Club home page Giter Club logo

Comments (5)

stephenmcd avatar stephenmcd commented on May 17, 2024

I tried a couple of them and they all return a value for the "err" arg in the callback function, showing they're invalid place IDs.

Can you try using the latest commit on GitHub?

from google-maps-services-js.

sumpton avatar sumpton commented on May 17, 2024
  1. That works.
  2. Thank you for the code!
  3. It failed for me with 0.3.1

I should have included that I was trying to catch the error

googleMapsClient.place(query, (err, res) => {
    if (err) {
        console.error(err);
        done(err);
    } else {
        console.log(util.inspect(res.json.result, { depth: null }));
        // stuff
    }
});

but the script was not returning -- anything :)

this worked:

"@google/maps": "git+https://github.com/googlemaps/google-maps-services-js.git",

from google-maps-services-js.

stephenmcd avatar stephenmcd commented on May 17, 2024

Cool, we should have a new release out soon.

from google-maps-services-js.

sumpton avatar sumpton commented on May 17, 2024

I am sorry to reopen this, I must be doing something wrong, because I am having the same problem today -- with the script not returning.

After I re-installed with npm with

"dependencies": {
    "@google/maps": "git+https://github.com/googlemaps/google-maps-services-js.git", 

I did see an error with "status", and changed my err test to

if (err) {
    if (res.json.status === 'NOT_FOUND') {
        console.log('skip not found');
        done();
    } else {
        console.error(err);
        done(err);
    }
} else {

and believe I process several place_id, but I am not sure how many.

Now if I try the problem examples, this one for instance,

'EjJNYWdocmViLCA1NSBBZGFyLCBrc2FyIGhhcnQgZWwgbW9yYWJpdGluZSwgTW9yb2Njbw'

they hang. I tried reinstalling the package with npm again. Any ideas what I am doing wrong?

from google-maps-services-js.

atrain0789 avatar atrain0789 commented on May 17, 2024

+1 I am getting the same thing on certain IDs. Request just hangs indefinitely until (I think) the browser is timing out the request at 5 minutes. No matter the timeout settings etc. I use in the place request params it just hangs. For example a placeid of "foo" just hangs instead of sending back what I get when I do a request directly in browser which is "INVALID_REQUEST"

from google-maps-services-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.