Skip to content

feat(google-maps): add event emitter for gm_authFailure callback #22953

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

Merged

Conversation

kgajera
Copy link
Contributor

@kgajera kgajera commented Jun 10, 2021

Emit event from the GoogleMap component when the gm_authFailure callback is called.

Fixes #22163

@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 10, 2021
@kgajera kgajera force-pushed the maps-auth-failure-callback-event-emitter branch from 309a6c3 to 390641c Compare June 10, 2021 23:44
@kgajera kgajera requested a review from a team as a code owner June 10, 2021 23:44
@devversion devversion requested review from crisbeto and mbehrlich and removed request for a team June 11, 2021 12:48
Copy link
Collaborator

@mbehrlich mbehrlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -245,6 +253,7 @@ export class GoogleMap implements OnChanges, OnInit, OnDestroy {
'https://developers.google.com/maps/documentation/javascript/' +
'tutorial#Loading_the_Maps_API');
}
googleMapsWindow.gm_authFailure = () => this.authFailure.emit();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this will break if there are multiple maps on the page since each one will overwrite the auth failure callback on the previous map. We should do something like in the youtube-player: https://github.com/angular/components/blob/master/src/youtube-player/youtube-player.ts#L224

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@kgajera kgajera force-pushed the maps-auth-failure-callback-event-emitter branch 4 times, most recently from edc39a0 to 3afbba1 Compare June 14, 2021 11:34
@kgajera kgajera force-pushed the maps-auth-failure-callback-event-emitter branch from 3afbba1 to c7213c4 Compare June 14, 2021 11:43
@kgajera kgajera requested a review from crisbeto June 14, 2021 12:08
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release labels Jun 18, 2021
@mmalerba mmalerba merged commit 224de73 into angular:master Jun 22, 2021
@kgajera kgajera deleted the maps-auth-failure-callback-event-emitter branch June 26, 2021 16:48
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(google-maps): Google maps gm_authFailure
4 participants