Matt-Jensen / ember-cli-g-maps

Deprecated Google Maps Addon
http://matt-jensen.github.io/ember-cli-g-maps
MIT License
59 stars 31 forks source link

Cannot read property 'Autocomplete' #92

Closed khriztianmoreno closed 7 years ago

khriztianmoreno commented 7 years ago

Hey everyone, I want to show an autocomplete input in my component but in console displayed this error TypeError: Cannot read property 'Autocomplete' of undefined at Class.setup (g-autocomplete.js:46). How to configurete the componet?

.hbs

{{g-autocomplete class="form-control js-googleplacesearch-input" placeholder="Place, Address, or Landmark" }}
khriztianmoreno commented 7 years ago

I was able to solve it, it was just to add the library in the config.

ENV.googleMap = {
    apiKey: '....464564',
    libraries: ['places'], // Add library
  }