Skip to content
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

Fix line rendering at high line-offsets with non-miter linejoin #2316

Closed
peterqliu opened this issue Mar 23, 2016 · 4 comments
Closed

Fix line rendering at high line-offsets with non-miter linejoin #2316

peterqliu opened this issue Mar 23, 2016 · 4 comments
Assignees
Labels

Comments

@peterqliu
Copy link
Contributor

mapbox-gl-js version: v0.15.0

Steps to Trigger Behavior

Check out https://jsfiddle.net/nx2nh1vk/. It is identical to the geojson line example, save with a line-offset:20 property added.

Expected Behavior

I expect lines to render as cleanly as if there were no offset.

Actual Behavior

Line pinches, tapers, intersects itself, breaks, and is otherwise distended.

@mourner
Copy link
Member

mourner commented Mar 23, 2016

Looks like this only happens with round linejoins. If you remove this property, it looks good.

@mourner
Copy link
Member

mourner commented Mar 23, 2016

And bevel linejoins too. Screenshots:

Round:
image

Bevel:
image

Miter (default):
image

@mourner mourner changed the title Sloppy line rendering at high line-offsets Sloppy line rendering at high line-offsets with non-miter linejoin Mar 23, 2016
@lucaswoj
Copy link
Contributor

This is a known (but not ticketed) issue that affects mapbox-gl-js and mapbox-gl-native.

This patch implements rudimentary support for offsetting lines.

It doesn't properly offset line joins that are very sharp, and generally only works okay-ish for miter joins (bevel or round joins start to look weird at a certain distance).

-- @kkaefer in mapbox/mapbox-gl-native#3092 (comment)

@lucaswoj lucaswoj changed the title Sloppy line rendering at high line-offsets with non-miter linejoin Fix line rendering at high line-offsets with non-miter linejoin Jul 29, 2016
@lbud
Copy link
Contributor

lbud commented May 30, 2018

Closing in favor of #3809 as that ticket has more information (#3809 (comment)).

@lbud lbud closed this as completed May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants