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

Polyline intersection bug #1164

Closed
jordiJIG opened this Issue Oct 9, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@jordiJIG

jordiJIG commented Oct 9, 2018

Issue Type

[ ] Question
[X] Bug
[ ] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation

Description and/or steps/code to reproduce the problem

Hi,

I am developing an application with osmdroid and I am using Polylines with OSM.
Everything works well, but the lines do not come together correctly at the points of union. It does not seem to be fluid at all.

I'm adding the points directly with "line.setPoints (geoPoints);"

image

Am I forgetting something?

Thanks!

(Sorry if this is already answered, but I searched and found no information)

Version of osmdroid the issue relates to:

6.0.1

@spyhunter99

This comment has been minimized.

Show comment
Hide comment
@spyhunter99

spyhunter99 Oct 9, 2018

Collaborator
Collaborator

spyhunter99 commented Oct 9, 2018

@jordiJIG

This comment has been minimized.

Show comment
Hide comment
@jordiJIG

jordiJIG Oct 9, 2018

Thank you very much for answering!.

Yes, I have reduced the width of the line a little and it shows less.
As for putting the rounded edge, I can not find the method that does it inside the Polyline class.
Also, the variable mPaint is private and I can't override its style.

Any other idea?

jordiJIG commented Oct 9, 2018

Thank you very much for answering!.

Yes, I have reduced the width of the line a little and it shows less.
As for putting the rounded edge, I can not find the method that does it inside the Polyline class.
Also, the variable mPaint is private and I can't override its style.

Any other idea?

@monsieurtanuki

This comment has been minimized.

Show comment
Hide comment
@monsieurtanuki

monsieurtanuki Oct 9, 2018

Collaborator

I'm not satisfied either by those broken segments.
A possible solution could be to add a setter for mPaint.
Working on it...

Collaborator

monsieurtanuki commented Oct 9, 2018

I'm not satisfied either by those broken segments.
A possible solution could be to add a setter for mPaint.
Working on it...

@monsieurtanuki

This comment has been minimized.

Show comment
Hide comment
@monsieurtanuki

monsieurtanuki Oct 9, 2018

Collaborator

@jordiJIG Actually you may not need a setter as there's already a getter.
Try something like that:

myPolyline.getPaint().setStrokeCap(Paint.Cap.ROUND);
Collaborator

monsieurtanuki commented Oct 9, 2018

@jordiJIG Actually you may not need a setter as there's already a getter.
Try something like that:

myPolyline.getPaint().setStrokeCap(Paint.Cap.ROUND);
@jordiJIG

This comment has been minimized.

Show comment
Hide comment
@jordiJIG

jordiJIG Oct 10, 2018

Working with @monsieurtanuki solution!

I had not seen that getter XDD!!

Thanks!

jordiJIG commented Oct 10, 2018

Working with @monsieurtanuki solution!

I had not seen that getter XDD!!

Thanks!

@jordiJIG jordiJIG closed this Oct 10, 2018

monsieurtanuki added a commit that referenced this issue Oct 10, 2018

bug/#1164: fixed the broken segment joints for Polylines in demos
Impacted classes:
* `CustomPaintingSurface`: added a `Paint.Cap.ROUND` feature for all polylines
* `SampleRace`: added a `Paint.Cap.ROUND` feature for all polylines; unrelated - computed the initial bounding box

monsieurtanuki added a commit that referenced this issue Oct 10, 2018

Merge pull request #1166 from osmdroid/bug/#1164
bug/#1164: fixed the broken segment joints for Polylines in demos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment