Skip to content

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

Merged
merged 4 commits into from
Jan 26, 2020
Merged

Maps rectangle #18184

merged 4 commits into from
Jan 26, 2020

Conversation

mbehrlich
Copy link
Collaborator

No description provided.

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.
@mbehrlich mbehrlich requested a review from a team as a code owner January 16, 2020 00:34
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 16, 2020
const combinedOptionsChanges = this._combineOptions();

combinedOptionsChanges.pipe(take(1)).subscribe(options => {
this._rectangle = new google.maps.Rectangle(options);
Copy link
Member

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.

Copy link
Collaborator Author

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);
Copy link
Member

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.

Copy link
Collaborator Author

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?

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 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.

Copy link
Collaborator Author

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.
Copy link
Member

@jelbourn jelbourn left a 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

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Jan 26, 2020
@jelbourn jelbourn merged commit 3d68736 into angular:google-maps-next Jan 26, 2020
mbehrlich added a commit to mbehrlich/components that referenced this pull request Jan 31, 2020
Add rectangle component to @angular/google-maps that allows rectangles
to be overlayed over the Google map.
jelbourn pushed a commit that referenced this pull request Feb 13, 2020
Add rectangle component to @angular/google-maps that allows rectangles
to be overlayed over the Google map.
andrewseguin pushed a commit that referenced this pull request Feb 20, 2020
* 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]>
@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 Feb 29, 2020
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants