Coder Social home page Coder Social logo

Comments (14)

mattwagar avatar mattwagar commented on August 20, 2024

Having this issue too. How did you resolve this?

ember-cli: 2.14.1
node: 6.10

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

Hey @mattwagar,

Let me take a look today at night.

Best regards,
Daniel.

from ember-place-autocomplete.

mattwagar avatar mattwagar commented on August 20, 2024

I have the API Key for Google Places in my environment.js, and copied your component into my template.hbs. Do I need to initialize window.google anywhere?

from ember-place-autocomplete.

mattwagar avatar mattwagar commented on August 20, 2024

Did you look into this?

from ember-place-autocomplete.

franklington avatar franklington commented on August 20, 2024

Sry for my late response. I wish had documented the error more precisely because I don't know how i solved it. What is your setup for the component? Do you have a code example?

This is how my environment.js looks like

    contentSecurityPolicy: {
      'script-src': "'self' 'unsafe-eval' apis.google.com' *.googleapis.com maps.gstatic.com",
      'frame-src': "'self' https://*.firebaseapp.com'",
      'connect-src': "'self' wss://*.firebaseio.com https://*.googleapis.com' maps.gstatic.com"
    },
    'place-autocomplete':{
      exclude: false,
      key: 'XXXXXXXXXXXXXXXX'
    },

My Template:

 {{#place-autocomplete-field
                 value= address
                 disable=false
                 handlerController= this
                 classNames='ui right icon input'
                 inputClass= 'place-autocomplete--input '
                 focusOutCallback='placeDone'
                 placeChangedCallback='placeChanged'
                 types='address'
                 restrictions= autocompleteRestrictions
                 withGeoLocate= true
               }}
                       {{input value=value
                             classBinding="inputClass"
                             tabindex=tabindex
                             disabled=disabled
                             bubbles=true}}
                         <i class="marker icon"></i>

 {{/place-autocomplete-field}}

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

Hey @mattwagar and @franklington Sorry, I had to do a server migration, so, I didn't have enough time to actually fix the problem. I have an idea about what is happening. I am going to try to fix the problem today.

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

@franklington, could you check the network tab of your google inspector to check if the request to the google inspector is being made, the client id is present and the request result is a success?

from ember-place-autocomplete.

franklington avatar franklington commented on August 20, 2024

@dmuneras what do u mean with request to GI? The authentication to the google server, if that is what you want to know, response is successful.

BTW the code I posted belongs to the 0.0.17 release. I saw that some things have changed.

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

Hey @franklington and @mattwagar,

I was doing some updates and fixes. I think your problem should be fixed now. I am going to release a new version now to let you review if that fix your problem.

Best regards,
Daniel.

from ember-place-autocomplete.

mattwagar avatar mattwagar commented on August 20, 2024

Hello @dmuneras,

Sorry for the lack of response. I upgraded to version 0.0.20 and it works!

However, in your documentation you should explain what "exclude: boolean" means in the environment.js. When I switched it to false like @franklington suggested, the autocomplete worked.

Best,
Matt

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

@mattwagar I am glad everything is working for you now. It should work even if you don't use exclude option.

from ember-place-autocomplete.

grapho avatar grapho commented on August 20, 2024

@dmuneras I am having a very similar error when writing acceptance tests

cannot set property maps of undefined...

It looks like window.google is not being initialized in test land

using latest addon version and ember-cli ~2.15.1

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

Hey @grapho,

Still happening with the last version?

from ember-place-autocomplete.

dmuneras avatar dmuneras commented on August 20, 2024

@grapho You have to mock the Google API when testing, I added a section to the documentation web site to show you how I do it: https://dmuneras.github.io/ember-place-autocomplete/tests/mocks

from ember-place-autocomplete.

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.