Repository navigation
Angular-Maps not working in Angular 9 #127
Description
Activity
We are trying to upgrade to Angular 9 and Bing Map is not even loading.
TypeError: Cannot read property 'nativeElement' of undefined
at MapComponent.ngOnInit (angular-maps.js:7523)Any updates on this yet?
Also awaiting a response on this
The team at least inform us if you are committed to working on this repo at all
I've ended up forking this and fixing in my own repo. Just needed the
InitMapInstancefunction moving toAfterViewInitlifecycle.(More like a hot fix though, I've not changed the dependencies to Angular 9.)
Reacted by Craig Mellon, Danil Valov, Andrew Vitale and Stephanie McNaught- Thanks Joe… If you could submit a pull request, I’ll get it incorporated into the code base. From: JoeMellon <notifications@github.com> Sent: Tuesday, June 9, 2020 9:32 AM To: infusion-code/angular-maps <angular-maps@noreply.github.com> Cc: Subscribed <subscribed@noreply.github.com> Subject: Re: [infusion-code/angular-maps] Angular-Maps not working in Angular 9 (#127) I've ended up forking this and fixing in my own repo. Just needed the InitMapInstance function moving to AfterViewIniti lifecycle. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finfusion-code%2Fangular-maps%2Fissues%2F127%23issuecomment-641336262&data=02%7C01%7C%7C5b80b8578a27460a8aad08d80c81e242%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637273099263036746&sdata=w1ZEebIojIQ8CdtSOSSwyK2R3eSseUEQYSrPPrJhsQg%3D&reserved=0>, or unsubscribe<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGILTQXTGGW6K6VK2EKSRR3RVZBWJANCNFSM4KSQDERA&data=02%7C01%7C%7C5b80b8578a27460a8aad08d80c81e242%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637273099263036746&sdata=jC%2F7MKp0xg%2BXMbb7JU9x%2BiHua8xSxad0wVILSCEy%2BhU%3D&reserved=0>.
Any news on my PR been merged in yet?
Many thanks!
What to do to run bingmaps in angular 9?
@JoeMellon How you have implemented InitMapInstance?
Pls give solution on this. I am also getting same error like krishtgkk.
What to do to run bingmaps in angular 9?
@JoeMellon How you have implemented InitMapInstance?
Pls give solution on this. I am also getting same error like krishtgkk.
I forked this repo and added my fix to it and use that...needs the InitMapInstance function moving to AfterViewIniti lifecycle. See my PR in this repo for the fix.
As in the title, angular-maps doesn't work with Angular 9
The reason is how the viewchild is resolved. If you use ViewChild or ContentChild, angular is updating the way they resolve these queries to give developers more control. You must now specify that change detection should run before results are set. Example: @ViewChild('foo', {static: false}) foo !: ElementRef;.
https://angular.io/guide/static-query-migration