-
Notifications
You must be signed in to change notification settings - Fork 19
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
Added optional parameter to the aui-leaflet-locate-control to specify the zoomlevel #106
Added optional parameter to the aui-leaflet-locate-control to specify the zoomlevel #106
Conversation
… the zoomlevel The parameter is optional and if no value is given it will take the value that was previously used as the default value
@jsebrech @TriangleJuice @lievenvg @TomVanDenBroeck Ligt het aan een fout langs mijn kant dat de build failt? Het lijkt er niet op dat ik changes heb gemaakt waardoor de build zou kunnen failen? |
@Matthias-Claes |
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.
Don't forget to update the map unit tests as well.
@@ -119,13 +119,13 @@ export class LeafletMap { | |||
} | |||
|
|||
// CENTERING | |||
locate() { | |||
locate(zoomlevel: number = 19) { |
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.
Don't forget to do a check if the given zoom level is a valid value.
And if you're going to set the default value here as well, it's better to set it in a shared config file.
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.
On top of our inline comments, I would suggest using ‘zoom level’ (in text) and zoomLevel
(In code), since ‘zoomlevel’ isn’t correct English.
...b/src/leaflet/components/controls/leaflet-locate-control/leaflet-locate-control.component.ts
Outdated
Show resolved
Hide resolved
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.
If u can just update the public
remark.
...b/src/leaflet/components/controls/leaflet-locate-control/leaflet-locate-control.component.ts
Outdated
Show resolved
Hide resolved
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.
Overlooked the merge conflict, sorry..
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.
Code is perfect like this! Is it possible to list the default zoomLevel
in the readme, or even add a small link to the Leaflet documentation on what this zoom level actually means. Thanks!
The parameter is optional and if no value is given it will take the value that was previously used as the default value
PR Checklist
This PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The 'aui-leaflet-locate-control' has a set zoomlevel it will always use.
Issue Number: N/A
What is the new behavior?
The 'aui-leaflet-locate-control' now has a 'zoomlevel' parameter for users to specify.
Does this PR introduce a breaking change?
Other information
Resolved issues