Comments (14)
Having this issue too. How did you resolve this?
ember-cli: 2.14.1
node: 6.10
from ember-place-autocomplete.
Hey @mattwagar,
Let me take a look today at night.
Best regards,
Daniel.
from ember-place-autocomplete.
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.
Did you look into this?
from ember-place-autocomplete.
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.
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.
@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.
@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.
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.
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.
@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.
@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.
Hey @grapho,
Still happening with the last version?
from ember-place-autocomplete.
@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)
- Multiple input destroy issue HOT 4
- Use Qunit instead of Mocha
- DOC: Update tests support section wording and examples code.
- New release (2.1.3?) HOT 3
- Application initializes before Google Places library loads HOT 1
- Assertion Failed: Cannot call set with 'address' on an undefined object. HOT 1
- put an example that actually works HOT 6
- Can creation of script tag be deferred until page load? HOT 4
- After update ember 3.1.2, inputClass doesn't appear HOT 3
- new release? HOT 4
- Fix Acceptance Tests instructions in Readme HOT 1
- Support for session token HOT 8
- Deprecation on latest Ember HOT 3
- placeChangedCallback and focusOutCallback actions not being called HOT 3
- Issue with using inside component HOT 5
- Latitude and Longitude on City HOT 5
- (Just a question) Is there a way to customize the pac container if you are using it multiple places? HOT 1
- autocomplete not working inside component template HOT 1
- Cannot read property 'getPlacePredictions' HOT 6
- Test Mocks are not usable by consumers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-place-autocomplete.