-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(google-maps): expose the underlying Google Maps objects. #18613
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
Conversation
* | ||
* See developers.google.com/maps/documentation/javascript/reference/map#Map | ||
*/ | ||
googleMap?: google.maps.Map; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the object is created asynchronously, maybe we should expose an Observable or a Promise instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly, I'm unsure if there's actually a case where the component is initialized but the google map object is unset outside of the server-side rendering case. I do not like the idea of an observable wrapped around a union of the map and undefined though. We could have the observable never emit if we are server-side rendering. Any thoughts, @jelbourn ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the map ever be uninitialized by ngOnInit
? If so, what would happen? If there's no situation where the map can be undefined without throwing an error by the end of ngOnInit
, I don't see the need to make it a promise/stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The components were changed so that when they're loaded server side, the map is not initialized. However, in that case, the map is never initialized. To me, that seems like undefined would be more appropriate than an unemitted observable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Expose the underlying Google Maps objects so they can be interacted with when it's necessary to do something unimplemented by angular/google-maps. As part of this change, update DefinitelyTyped so that we do not need a custom map object. Also standardize how underlying objects interact with the components and updates new components to work correctly when loading from the server.
Remove unused UpdatedGoogleMap type.
Remove references to UpdatedGoogleMap from tests.
Fix merge conflicts and update the Circle component with changes.
Update the public api with new changes.
Correct package.json file with correct version.
Fixes variable name that reverted due to merge.
…r#18613) Expose the underlying Google Maps objects so they can be interacted with when it's necessary to do something unimplemented by angular/google-maps. As part of this change, update DefinitelyTyped so that we do not need a custom map object. Also standardize how underlying objects interact with the components and updates new components to work correctly when loading from the server.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Expose the underlying Google Maps objects so they can be interacted with
when it's necessary to do something unimplemented by
angular/google-maps. As part of this change, update DefinitelyTyped so
that we do not need a custom map object. Also standardize how
underlying objects interact with the components and updates new
components to work correctly when loading from the server.