-
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 (#5020)
- Loading branch information
Lauren Budorick
authored
Jul 24, 2017
1 parent
70b779c
commit afa50f4
Showing
6 changed files
with
264 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.
130 changes: 130 additions & 0 deletions
130
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,130 @@ | ||
{ | ||
"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": "identity", | ||
"property": "join" | ||
} | ||
}, | ||
"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.
129 changes: 129 additions & 0 deletions
129
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,129 @@ | ||
{ | ||
"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": "identity", | ||
"property": "join" | ||
} | ||
}, | ||
"paint": { | ||
"line-width": 8 | ||
} | ||
} | ||
] | ||
} |