-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement property functions for line-join
- Loading branch information
Lauren Budorick
committed
Jul 24, 2017
1 parent
70b779c
commit ded25a9
Showing
6 changed files
with
292 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+2 KB
test/integration/render-tests/line-join/property-function-dasharray/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
144 changes: 144 additions & 0 deletions
144
test/integration/render-tests/line-join/property-function-dasharray/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 128, | ||
"height": 64 | ||
} | ||
}, | ||
"zoom": 0, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"join": "miter" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-36, | ||
16 | ||
], | ||
[ | ||
-36, | ||
0 | ||
], | ||
[ | ||
-20, | ||
-16 | ||
], | ||
[ | ||
-20, | ||
16 | ||
], | ||
[ | ||
-28, | ||
16 | ||
] | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"join": "round" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-8, | ||
16 | ||
], | ||
[ | ||
-8, | ||
0 | ||
], | ||
[ | ||
8, | ||
-16 | ||
], | ||
[ | ||
8, | ||
16 | ||
], | ||
[ | ||
0, | ||
16 | ||
] | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"join": "bevel" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
20, | ||
16 | ||
], | ||
[ | ||
20, | ||
0 | ||
], | ||
[ | ||
36, | ||
-16 | ||
], | ||
[ | ||
36, | ||
16 | ||
], | ||
[ | ||
28, | ||
16 | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "line", | ||
"type": "line", | ||
"source": "geojson", | ||
"layout": { | ||
"line-join": { | ||
"type": "categorical", | ||
"property": "join", | ||
"stops": [ | ||
[ | ||
"miter", | ||
"miter" | ||
], | ||
[ | ||
"round", | ||
"round" | ||
], | ||
[ | ||
"bevel", | ||
"bevel" | ||
] | ||
] | ||
} | ||
}, | ||
"paint": { | ||
"line-width": 8, | ||
"line-dasharray": [1, 1] | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+1.11 KB
test/integration/render-tests/line-join/property-function/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
143 changes: 143 additions & 0 deletions
143
test/integration/render-tests/line-join/property-function/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 128, | ||
"height": 64 | ||
} | ||
}, | ||
"zoom": 0, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"join": "miter" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-36, | ||
16 | ||
], | ||
[ | ||
-36, | ||
0 | ||
], | ||
[ | ||
-20, | ||
-16 | ||
], | ||
[ | ||
-20, | ||
16 | ||
], | ||
[ | ||
-28, | ||
16 | ||
] | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"join": "round" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
-8, | ||
16 | ||
], | ||
[ | ||
-8, | ||
0 | ||
], | ||
[ | ||
8, | ||
-16 | ||
], | ||
[ | ||
8, | ||
16 | ||
], | ||
[ | ||
0, | ||
16 | ||
] | ||
] | ||
} | ||
}, | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"join": "bevel" | ||
}, | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
20, | ||
16 | ||
], | ||
[ | ||
20, | ||
0 | ||
], | ||
[ | ||
36, | ||
-16 | ||
], | ||
[ | ||
36, | ||
16 | ||
], | ||
[ | ||
28, | ||
16 | ||
] | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "line", | ||
"type": "line", | ||
"source": "geojson", | ||
"layout": { | ||
"line-join": { | ||
"type": "categorical", | ||
"property": "join", | ||
"stops": [ | ||
[ | ||
"miter", | ||
"miter" | ||
], | ||
[ | ||
"round", | ||
"round" | ||
], | ||
[ | ||
"bevel", | ||
"bevel" | ||
] | ||
] | ||
} | ||
}, | ||
"paint": { | ||
"line-width": 8 | ||
} | ||
} | ||
] | ||
} |