-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(google-maps): Add MapPolyline component #17512
Conversation
* @see developers.google.com/maps/documentation/javascript/reference/polygon#Polyline.getEditable | ||
*/ | ||
getEditable(): boolean { | ||
return this._polyline!.getEditable(); |
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.
From what I can tell, we aren't guaranteed to have a _polyline
at all times so the the !
here is misleading. It might be better to null check it. Same goes for all the other getters.
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 did it like this because _polyline is initialized in ngOnInit, but it should always be initialized. Let me know if the latest changes I'm uploading are acceptable.
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.
Include docs for polyline in this change?
If this component isn't going out in the 9.0 release, will that be confusing for users if Polyline is in the docs but not in the release? My intention was to make a separate document for all of the geometry components and have the main docs link to it when they were ready. What do you think? |
(polylineClick)="handleClick()" | ||
(polylineRightclick)="handleRightclick()"> | ||
</map-polyline> | ||
</google-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.
Not a big deal, but it seems like this template is 4 space indented vs 2.
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 this is something unusual with how spacing in multi line template literals are being interpreted. It is two spaces on my IDE, I'm not sure if there's a setting I need to to change on my IDE or what but I'll look into it.
Add a MapPolyline component to @angular/google-maps that allows drawing polylines on a Google Map.
Clean up test data and use underscore for private members.
Change component to a directive.
Fix lint error due to exceeding line length limit.
Change event listener prefix from "map" to "polyline" in polyline component to indicate the different behavior of the polyline events.
Clean up demo component.
ad10e7f
to
3a84118
Compare
As mentioned in the api_golden_checks build message you need to run a local Bazel command to approve the changes to the public API. This can be done via Then you can amend your commit and force push it up to your branch. |
@Splaktar the |
@crisbeto Oh good! I'll update it. @mbehrlich Then it would be good if you could squash your commits. This guide has instructions for that. In the future, if you amend your commit and force push, you can avoid the need to squash. |
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.
Other than the need to squash and update the API Goldens, this LGTM!
No need to manually squash commits any more; we always just use "Squash and merge" on github (though I tend to always squash mine anyway out of habit) |
Add Polyline to public API.
Should be ready now. |
Caretaker note: can be merged after 9.0.0 is released |
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. |
Add a MapPolyline component to @angular/google-maps that allows drawing
polylines on a Google Map.