Skip to content

Drawing of paths with separate segments in a single layer? #970

Answered by moving-bits
moving-bits asked this question in Q&A
Discussion options

You must be logged in to vote

Found a simple solution meanwhile:

Instead of

final PathLayer trackLayer = new PathLayer(map, color, width);
map.layers().add(trackLayer);
trackLayer.setPoints(segment);

I'm using this now:

final Style pathStyle = Style.builder().strokeWidth(width).strokeColor(color).build();
final LineDrawable path = new LineDrawable(segment, pathStyle);
trackLayer.add(path);

(with trackLayer being the VectorLayer holding all my tracks now).

Thanks for your help pointing me into the right direction!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@devemux86
Comment options

Answer selected by devemux86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants