angular-google-maps
angular-google-maps copied to clipboard
Async loading and google global error.
Since I upgraded to 2.3.3 I got 4 errors at loading time.
Uncaught ReferenceError: google is not defined @ markerwithlabel.js:71
Uncaught ReferenceError: google is not defined @ infobox.js:116
Uncaught ReferenceError: google is not defined @ keydragzoom.js:820
Uncaught ReferenceError: google is not defined @ richmarker.js:60
It seems to be caused by the async loading of the google maps API. I saw that https://github.com/angular-ui/angular-google-maps/blob/cb667cb7b55a607929537a2fd8250613e38e9be3/spec/coffee/bootstrap/google-api-mock.coffee#L484 try to mock those but it isn't working.
Bonus : Goal of making those lib dependencies is, I think, to make them optional. Is it doable today?
I'm getting the same problem - and my
If there is no way to fix this ATM, can someone tell me which is the latest stable version without that problem?
@kdkade We fixated our version to 2.3.2 for now which restored functionality
I am receiving the same problem. Why were these additional dependencies required?
@Qwerios Thanks, did the same and I confirm it solves the issue.
same here.. thanks @Qwerios lets wait the fix for v2.3.3 :fries:
Same error here on version 2.3.3. Downgraded to 2.3.2 and everything works great.
Same here, but i get the error even in 2.3.2
I had the same problem with latest update for google maps.
But after downgrading to 2.3.2 it works fine now.
After clone project in my github, i'm getting same problem on version 2.3.2
2.3.2 is working ok for me D:
@heoheoyh have u tried cleaning bower/npm cache or simply rm -rf bower_components/
?
@lfreneda it was my mistake..! my version was 2.3.3 and I had reinstalled exactly 2.3.2 version. It is ended up working!
I also have the issue, but maybe I can add that I'm using bower with main-bower-files
, if it can help.
As everyone, works fine in 2.3.2. Any news?
I couldn't downgrade because 2.3.2
has broken cluster images which my site depends on. I was able to hack it for now by adding the script tag into the index.html without async defer
:
<!-- Hack to fix exceptions caused by latest version of angular-google-maps -->
<script src="https://maps.googleapis.com/maps/api/js"></script>
This probably isn't a good thing in the long run, especially loading it without an API key, but it got my site back up and running tonight. I tried to look at making a fix to the library itself, but I have no interest in dealing with CoffeeScript.
@Splaktar 's workaround was awesome except it wouldn't work with mocha... Downgrading to 2.3.2 was the only thing that allowed unit tests to pass.
The problem lies in this commit I believe https://github.com/angular-ui/angular-google-maps/commit/cb667cb7b55a607929537a2fd8250613e38e9be3#diff-0a08a7565aba4405282251491979bb6b - https://github.com/angular-ui/angular-google-maps/blob/cb667cb7b55a607929537a2fd8250613e38e9be3/bower.json
Those 4 new dependencies are looking for 'google' to be defined, however the maps api is loaded until after...using the async loader
Hi, even after downgrading to 2.3.2, its not working. Please check this plunker - http://plnkr.co/edit/AJpJxBHF1SpwCtRKEzPF?p=preview
I have changed the angular-google-maps to v2.3.2.
Please let me know if you are able to resolve this. Thanks.
Is anyone looking into this issue? This is problematic for production projects, please at least revert the latest nam package to be the 2.3.2 (working) version, to avoid issues.
Add the tag - and it shouldn't break
Thanks, works after downgrading to 2.3.2!
Same problem in 2.4.0. I had to downgrade into 2.3.2 as suggested by many of you. Thanks.
Same here, when using 2.4.0 I get the google not defined error. 2.3.2 works fine!
downgrading to 2.3.2 resolved this issue for me as well.
I got the same issue on version 2.4.0
but downgraded again to 2.3.2
, and worked again.
But I noticed something, when I downgraded the version, and I run the bower prune
command:
bower prune bower uninstall google-maps-utility-library-v3-infobox bower uninstall google-maps-utility-library-v3-keydragzoom bower uninstall google-maps-utility-library-v3-markerwithlabel bower uninstall js-rich-marker bower uninstall markerclustererplus
Why? I think those files involved with issue somehow.
Same here.
The furthest version which work for me is version 2.3.2. Anything above that it just crashes with the error. Anyone has any luck with it?
Same here, when using 2.4.1 I get the google not defined error. 2.3.2 works fine!
The same issue. For me it happens because of automatic injection of dependencies. I guess markerwithlabel.js, infobox.js, keydragzoom.js and richmarker.js try to call google api after angular-google-maps adds api script on page. So it is just my supposition, but I hope I can help to investigate this.
Downgrading to 2.3.2 works for me as well
Hi, had the same problem with 2.4.1 version.
Seems I found solution by overriding dependency in bower.json that works for me:
"overrides": {
"angular-google-maps": {
"dependencies": {
"angular": "1.5.8",
"angular-simple-logger": "0.1.7"
}
}
}
Please note that angular-simple-logger is still required
perfect, works for me @olexam