-
Notifications
You must be signed in to change notification settings - Fork 89
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
VTM Style: allow adding dropDistance directly (related to #1082) #1085
VTM Style: allow adding dropDistance directly (related to #1082) #1085
Conversation
.fillAlpha(0.2f); | ||
.buffer(0.5) | ||
.fillColor(Color.RED) | ||
.fillAlpha(0.2f); |
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 formatting has changed?
We use the default IDEA settings.
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.
Sorry, I will correct this
this.pointReduction = false; | ||
this.dropDistance = dropDistance; | ||
return this; | ||
} |
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.
For clarity we should avoid changing multiple parameters in one setter.
As we add the dropDistance
parameter that already exists in LineBucket
,
we can remove the pointReduction
and simplify the functions.
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 hesitated to remove the "pointReduction" parameter because I feared that change would be breaking to existing users of the lib. Is this not an issue?
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.
This is not a common method and we will mention it in changelog.
Please see commit ee602a3, something like that should work?
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.
@eddiemuc you can update the pull request if you like.
b1c757d
to
35a3dbe
Compare
@devemux86 PR was updated |
Thanks! Can you reformat |
|
I am currently AFK, will do this later. Not so easy for me, I have non-standard settings in my IDE (from cgeo) |
@eddiemuc no problem! 🙂 |
If you can, I would appreciate it. Thanks! |
@eddiemuc thanks! |
Thanks to you as well! |
This PR adds a new parameter dropDistance to the VTM Style object. In addition to the already existing boolean parameter pointReduction (which, if set, applies a default fixed dropDistance to lines/points/polygons), it allows to specify a dropDistance directly.
This parameter can be used to mitigate the zooming problems specified in #1082.
The PR also adds an example polyline to the android-example
VectorLayerActivity
in the area of Hamburg, Germany. demonstrating the usage of this parameter.Zooming in: