-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
customize line thickness #21
Comments
Also: this is a wonderful tool -- thank you! |
Thank you! I'd totally love to do this, but I don't know how to do it efficiently. Right now it is not uncommon to have a road graph with 100,000+ segments, each encoded as a pair of coordinates To render segments I'm using The only way that I know how to add thickness to the line is via triangulation. We turn each line segment into a rectangle, and then split it into two triangles. This method would require much more memory and a little bit more pre-processing. Even if we don't consider memory consumption a problem, there is another thing that I haven't solved yet. My current implementation of thick lines doesn't have smooth transition between connected segments, which gives very jagged experience on high zoom levels: I'm learning webgl myself, and if there are some good tricks that could help us get thick lines in the most efficient manner - please share! |
Thanks for taking the time to respond, @anvaka ! I don't know much about webgl, I'm afraid. But I did notice that the SVG export is relatively easy to customize afterwards (by increasing the stroke-width of the |
Found a solution that doesn't consume as much CPU power as my original version. You can try it now, by loading a city, and then in the browser's developer tools, enter this command: scene.queryLayer().lineWidth = 2; // Sets new width to lines. |
It would be great to allow users to customize line-thickness (alongside colors) to improve contrast and to enable more variation.
The text was updated successfully, but these errors were encountered: