-
-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix text not being occluded by the globe when overlapmode=always (#4844)
* Add globe text overlap+occlusion render test * Move render test * Render test for lines * Fix overlap: always texts not being occluded by the globe * Fix icon overlap+occlusion, add render test * Add changelog entry * PR feedback
- Loading branch information
Showing
9 changed files
with
497 additions
and
12 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
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
+3.81 KB
...on/render/tests/projection/globe/text-always-overlap-occluded/line/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
226 changes: 226 additions & 0 deletions
226
test/integration/render/tests/projection/globe/text-always-overlap-occluded/line/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,226 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256, | ||
"width": 256 | ||
} | ||
}, | ||
"sky": { | ||
"atmosphere-blend": 0.0 | ||
}, | ||
"zoom": 1, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"projection": { | ||
"type": "globe" | ||
}, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Feature", | ||
"geometry": { | ||
"type": "MultiLineString", | ||
"coordinates": [ | ||
[ | ||
[ | ||
-160, | ||
-25 | ||
], | ||
[ | ||
-160, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-140, | ||
-25 | ||
], | ||
[ | ||
-140, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-120, | ||
-25 | ||
], | ||
[ | ||
-120, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-250, | ||
-25 | ||
], | ||
[ | ||
-250, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-80, | ||
-25 | ||
], | ||
[ | ||
-80, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-60, | ||
-25 | ||
], | ||
[ | ||
-60, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-40, | ||
-25 | ||
], | ||
[ | ||
-40, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
-20, | ||
-25 | ||
], | ||
[ | ||
-20, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
0, | ||
-25 | ||
], | ||
[ | ||
0, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
20, | ||
-25 | ||
], | ||
[ | ||
20, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
40, | ||
-25 | ||
], | ||
[ | ||
40, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
60, | ||
-25 | ||
], | ||
[ | ||
60, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
80, | ||
-25 | ||
], | ||
[ | ||
80, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
100, | ||
-25 | ||
], | ||
[ | ||
100, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
120, | ||
-25 | ||
], | ||
[ | ||
120, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
140, | ||
-25 | ||
], | ||
[ | ||
140, | ||
25 | ||
] | ||
], | ||
[ | ||
[ | ||
160, | ||
-25 | ||
], | ||
[ | ||
160, | ||
25 | ||
] | ||
] | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "blue" | ||
} | ||
}, | ||
{ | ||
"id": "text", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"layout": { | ||
"symbol-placement": "line-center", | ||
"text-field": "A", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
], | ||
"text-overlap": "always" | ||
}, | ||
"paint": { | ||
"text-color": "yellow" | ||
} | ||
} | ||
] | ||
} |
Binary file added
BIN
+7.77 KB
...der/tests/projection/globe/text-always-overlap-occluded/point-icon/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.