-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR Error: google is not defined when using fitBounds #1586
Comments
I can confirm this problem |
I wanted to see if the AgmFitBounds directive would solve the issue but the website is a bit buggered, i havn't used the fitbounds directive so im not sure, but it is missing from the stackblitz example |
If I'm not mistaken AgmFitBounds do not work on polylines only on markers |
I had similar issue and did this: and it worked after that. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@PavleO I can confirm that it indeed fixes the bug. you saved me because I updated to Angular 7. Thanks! |
Yes an official fix would be nice ... |
Hi @alexdabast and @MKahmen , thank you for the feedback. I really do not know what is going on with project, but I didn't find any alternative for it, so I think we are stuck with it if you use angular. Right now I am off the grid, but I will be back in ten days and will make a pull request with this fix. Lets hope that it will end up in official fix. |
Quick question: Can someone send a PR if you already know the exact line? That would help |
fixes sebholstein#1586 Add two more checks before using google.maps.LatLngBounds()
Add two more checks before using google.maps.LatLngBounds() fixes #1586
Issue description
It's not possible to use fitBounds attribute with LatLngBoundsLiteral object only boolean.
I discover this only on 1.0.0-beta.5
Steps to reproduce and a minimal demo of the problem
Very easy to reproduce https://stackblitz.com/edit/agm-fitbounds-issue
Current behavior
Using a LatLngBoundsLiteral object as fitBounds lead to an error
Expected/desired behavior
We should be able to set a LatLngBoundsLiteral object as fitBounds
angular2 & angular-google-maps version
angular 6.0.0
agm/core 1.0.0-beta.5
Other information
The text was updated successfully, but these errors were encountered: