-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Maps rectangle #18184
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
Maps rectangle #18184
Conversation
Add rectangle component to @angular/google-maps that allows rectangles to be overlayed over the Google map.
Add tests and demo for MapRectangle component.
Updates the public API with MapRectangle component.
const combinedOptionsChanges = this._combineOptions(); | ||
|
||
combinedOptionsChanges.pipe(take(1)).subscribe(options => { | ||
this._rectangle = new google.maps.Rectangle(options); |
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.
FYI there's an incoming change to initialize these objects outside the NgZone
: #18034.
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.
Okay, this is going into the separate "google-maps-next" branch, so in a forthcoming change I will merge in the latest changes from master and update both this and the Polygon component.
const combinedOptionsChanges = this._combineOptions(); | ||
|
||
combinedOptionsChanges.pipe(take(1)).subscribe(options => { | ||
this._rectangle = new google.maps.Rectangle(options); |
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.
Also this will throw during server-side rendering. See how it's handled in the other components.
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.
I see. Does fixing this rely on the NgZone change or should I fix this now?
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.
I think that it relies on the NgZone
changes since they update the event manager to emit events in the Zone. If this is urgent we can merge it in and I'll do a follow up PR to apply the same fix to the rectangle.
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.
Okay, no rush on rectangle though. It's not going into any release yet, it's the separate "google-maps-next" branch.
Remove unnecessary listeners array.
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, the clean-ups Kristiyan mentioned can go in a follow-up on the feature branch
Add rectangle component to @angular/google-maps that allows rectangles to be overlayed over the Google map.
Add rectangle component to @angular/google-maps that allows rectangles to be overlayed over the Google map.
* feat(google-maps): Add MapPolygon component (#17936) Add MapPolygon component to Google Maps, allowing polygons to be added to a Google Map. * Maps rectangle (#18184) Add rectangle component to @angular/google-maps that allows rectangles to be overlayed over the Google map. * refactor(google-maps): Update new components with NgZone fix. Add NgZone fix to new components, map-rectangle and map-polygon. Co-authored-by: mbehrlich <[email protected]>
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. |
No description provided.