From 268199f10e8930c3328fa476fa25d7b7c2136f4a Mon Sep 17 00:00:00 2001 From: Lauren Budorick Date: Fri, 21 Jul 2017 11:45:19 -0700 Subject: [PATCH] Revert "Implement property functions for line-cap, line-join (#5010)" (#5018) This reverts commit 2eef80b4a0c92a1818f07e8e8252fc61b0598a65. --- src/data/bucket/line_bucket.js | 4 +- src/style-spec/reference/v8.json | 2 - .../line-cap/property-function/expected.png | Bin 297 -> 0 bytes .../line-cap/property-function/style.json | 106 ------------- .../line-join/property-function/expected.png | Bin 1134 -> 0 bytes .../line-join/property-function/style.json | 143 ------------------ 6 files changed, 2 insertions(+), 253 deletions(-) delete mode 100644 test/integration/render-tests/line-cap/property-function/expected.png delete mode 100644 test/integration/render-tests/line-cap/property-function/style.json delete mode 100644 test/integration/render-tests/line-join/property-function/expected.png delete mode 100644 test/integration/render-tests/line-join/property-function/style.json diff --git a/src/data/bucket/line_bucket.js b/src/data/bucket/line_bucket.js index 7fbfd96dd3f..a7b2ddd2e87 100644 --- a/src/data/bucket/line_bucket.js +++ b/src/data/bucket/line_bucket.js @@ -96,8 +96,8 @@ class LineBucket extends Bucket { addFeature(feature: VectorTileFeature) { const layout = this.layers[0].layout; - const join = this.layers[0].getLayoutValue('line-join', {zoom: this.zoom}, feature.properties); - const cap = this.layers[0].getLayoutValue('line-cap', {zoom: this.zoom}, feature.properties); + const join = layout['line-join']; + const cap = layout['line-cap']; const miterLimit = layout['line-miter-limit']; const roundLimit = layout['line-round-limit']; diff --git a/src/style-spec/reference/v8.json b/src/style-spec/reference/v8.json index dc2f78d7798..7041f3323d4 100644 --- a/src/style-spec/reference/v8.json +++ b/src/style-spec/reference/v8.json @@ -535,7 +535,6 @@ "type": "enum", "function": "piecewise-constant", "zoom-function": true, - "property-function": true, "values": { "butt": { "doc": "A cap with a squared-off end which is drawn to the exact endpoint of the line." @@ -563,7 +562,6 @@ "type": "enum", "function": "piecewise-constant", "zoom-function": true, - "property-function": true, "values": { "bevel": { "doc": "A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width." diff --git a/test/integration/render-tests/line-cap/property-function/expected.png b/test/integration/render-tests/line-cap/property-function/expected.png deleted file mode 100644 index a0ba3182ae28b004319ab0a6bb439ddff45329cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=Or9=|Ar*{or0OmKd5=K6w+A=o z9tvP!J#boBC`p~GTCYokwfLrMS=Wo800q|_o>Tlk)}(L09a{Z4O1(V(U*4gl+g&&L z+1DFBl%2d=R6c@N?D5=<37-rS58g~Lymxe4_rat+H@DqPU_Y-rBWL!;Uvn4dx;MM- z)DVBVC}v7`QJ~%_N;uXPdEe^uEUMn6ZIH;{m}?l(Q@-_W)&`09!p33z+G#aXZyuP2 kt+Ckod(-W=W%?g@@0N-?L}on|2Ktu4)78&qol`;+0QR+f^8f$< diff --git a/test/integration/render-tests/line-cap/property-function/style.json b/test/integration/render-tests/line-cap/property-function/style.json deleted file mode 100644 index fa548dfcf47..00000000000 --- a/test/integration/render-tests/line-cap/property-function/style.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "version": 8, - "metadata": { - "test": { - "width": 64, - "height": 64 - } - }, - "sources": { - "geojson": { - "type": "geojson", - "data": { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "properties": { - "cap": "butt" - }, - "geometry": { - "type": "LineString", - "coordinates": [ - [ - -16, - -16 - ], - [ - -16, - 16 - ] - ] - } - }, - { - "type": "Feature", - "properties": { - "cap": "round" - }, - "geometry": { - "type": "LineString", - "coordinates": [ - [ - 0, - -16 - ], - [ - 0, - 16 - ] - ] - } - }, - { - "type": "Feature", - "properties": { - "cap": "square" - }, - "geometry": { - "type": "LineString", - "coordinates": [ - [ - 16, - -16 - ], - [ - 16, - 16 - ] - ] - } - } - ] - } - } - }, - "layers": [ - { - "id": "line", - "type": "line", - "source": "geojson", - "layout": { - "line-cap": { - "type": "categorical", - "property": "cap", - "stops": [ - [ - "butt", - "butt" - ], - [ - "round", - "round" - ], - [ - "square", - "square" - ] - ] - } - }, - "paint": { - "line-width": 8 - } - } - ] -} diff --git a/test/integration/render-tests/line-join/property-function/expected.png b/test/integration/render-tests/line-join/property-function/expected.png deleted file mode 100644 index b4be40940a853cee30747a7ebf591c1afac220a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1134 zcmeAS@N?(olHy`uVBq!ia0vp^4M6O`!3HERU8}DLQcRvMjv*C{Z=~ujF)*;GgLrQb z)^^-0Wn}np{`20=oyxm?lZ|iatg_cRYP`jzcm+r5+d{SOuT2{TR8uQ=%bc58R37y? zSO595RWFm2t0K3GZ+Dj#b_$rHxg}QMVtr@Q8iDr$f^*LOT5PZMsQmo*ca?SbpQrDC z|6KX>CY{rpqOvsZH=Og)yxvfu{$bh{wj;BRod2FO&-`}Ga81nQM|*q4KWfzJ^?H6h zW{}19E7jPLefmSAIgRb1r#tGUMKw>PWpi|gp676L<=S-fmxSHgS#AbePW!*H75Z%C zj9E|~mb5%+_lMl45exR7jaYlb;8^K>4!PqknJkfOStHke)xJOFCGU&1nn&##E`PZ; zC5hSU%KDnmBGJ8PtFq@MS#J!=KO6i;f~{2HM3yc|=tYdZ*vfUrp|@{VX}q|zGvlH1 zs!YvqE7x7UvB16QorS!v&V+lXZ~f+~TWvn?^1a*&2Y!~jpCz{xEZfre$oH-8@w}IB z4|?C)E&EzkY>RoL^wFIhx@RVz6L}|)&RVCqH}=t*!+V9e9=$nGeq^VF?i{_jxjX#l z$#te#<{OIG}o?A?6*+f5zTb)%pZySqUoGb z7NJ(z8w2M|y`i{vebRo5?+^S`xzpYW@^lunMp?L8WgF<7ojZK` z$D$ zIG$`Oy4%Pm@9(OY7PEdVp2U*5=HQN3yZG2cF0amb zU$J(blQW+y@h;g2JY-qn_iwdc;Ddu|0+iD>iMrH`#x9M vmLzG{!*=heVvOeMxvroLt8@Av{~zwFe*4;w3kW9y3lIiRS3j3^P6