From e039aa04e8254981ec28b60a600890506b4361a4 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Mon, 23 Mar 2020 14:15:08 -0400 Subject: [PATCH] populate paint arrays once per line feature instead of once per linestring in a multiline --- src/data/bucket/line_bucket.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/bucket/line_bucket.js b/src/data/bucket/line_bucket.js index db661fa67a3..d8a99723174 100644 --- a/src/data/bucket/line_bucket.js +++ b/src/data/bucket/line_bucket.js @@ -219,11 +219,13 @@ class LineBucket implements Bucket { const roundLimit = layout.get('line-round-limit'); for (const line of geometry) { - this.addLine(line, feature, join, cap, miterLimit, roundLimit, index, canonical, imagePositions); + this.addLine(line, feature, join, cap, miterLimit, roundLimit); } + + this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, imagePositions, canonical); } - addLine(vertices: Array, feature: BucketFeature, join: string, cap: string, miterLimit: number, roundLimit: number, index: number, canonical: CanonicalTileID, imagePositions: {[_: string]: ImagePosition}) { + addLine(vertices: Array, feature: BucketFeature, join: string, cap: string, miterLimit: number, roundLimit: number) { this.distance = 0; this.scaledDistance = 0; this.totalDistance = 0; @@ -468,8 +470,6 @@ class LineBucket implements Bucket { } } } - - this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, feature, index, imagePositions, canonical); } /**