diff --git a/src/data/bucket/line_bucket.js b/src/data/bucket/line_bucket.js index 4e1f31c65d7..f1cfe80e34f 100644 --- a/src/data/bucket/line_bucket.js +++ b/src/data/bucket/line_bucket.js @@ -250,7 +250,9 @@ class LineBucket implements Bucket { if (join === 'bevel') miterLimit = 1.05; - const sharpCornerOffset = SHARP_CORNER_OFFSET * (EXTENT / (512 * this.overscaling)); + const sharpCornerOffset = this.overscaling < 16 ? + SHARP_CORNER_OFFSET * EXTENT / (512 * this.overscaling) : + 0; // we could be more precise, but it would only save a negligible amount of space const segment = this.segments.prepareSegment(len * 10, this.layoutVertexArray, this.indexArray); diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#9009/expected.png b/test/integration/render-tests/regressions/mapbox-gl-js#9009/expected.png new file mode 100644 index 00000000000..b14d5740582 Binary files /dev/null and b/test/integration/render-tests/regressions/mapbox-gl-js#9009/expected.png differ diff --git a/test/integration/render-tests/regressions/mapbox-gl-js#9009/style.json b/test/integration/render-tests/regressions/mapbox-gl-js#9009/style.json new file mode 100644 index 00000000000..59b1f474e5f --- /dev/null +++ b/test/integration/render-tests/regressions/mapbox-gl-js#9009/style.json @@ -0,0 +1,44 @@ +{ + "version": 8, + "metadata": { + "test": { + "height": 256 + } + }, + "center": [ + 0, + 0 + ], + "zoom": 18, + "sources": { + "line": { + "type": "geojson", + "maxzoom": 10, + "data": { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [[-180, 70], [0, 0], [100, 80]] + } + } + } + }, + "layers": [ + { + "id": "background", + "type": "background", + "paint": { + "background-color": "white" + } + }, + { + "id": "road", + "type": "line", + "source": "line", + "paint": { + "line-width": 20, + "line-color": "#000" + } + } + ] +}