Skip to content

Commit

Permalink
Add render test for symbol-sort-key with ignored icon / text placement (
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshalamov authored and ahk committed Jul 3, 2019
1 parent e7a6286 commit a6b4463
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/ignores.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"render-tests/text-field/formatted-text-color": "skip - https://github.com/mapbox/mapbox-gl-js/issues/8045",
"render-tests/runtime-styling/layout-property-override-paint-property-expression": "skip - https://github.com/mapbox/mapbox-gl-js/issues/8045",
"render-tests/runtime-styling/layout-property-override-paint-property-literal": "skip - https://github.com/mapbox/mapbox-gl-js/issues/8045",
"render-tests/text-field/formatted-text-color-overrides-nested-expression": "skip - https://github.com/mapbox/mapbox-gl-js/issues/8045"
"render-tests/text-field/formatted-text-color-overrides-nested-expression": "skip - https://github.com/mapbox/mapbox-gl-js/issues/8045",
"render-tests/symbol-sort-key/text-ignore-placement": "skip - text drawn over icons"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"version": 8,
"metadata": {
"test": {
"height": 64,
"width": 64
}
},
"center": [0, 32],
"zoom": 1,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"color": "red",
"sort-key": 1,
"image": "interstate_2"
},
"geometry": {
"type": "Point",
"coordinates": [
6,
35
]
}
},
{
"type": "Feature",
"properties": {
"color": "green",
"sort-key": 0,
"image": "interstate_2"
},
"geometry": {
"type": "Point",
"coordinates": [
6,
29
]
}
}, {
"type": "Feature",
"properties": {
"color": "red",
"sort-key": 1,
"image": "interstate_2"
},
"geometry": {
"type": "Point",
"coordinates": [
-6,
35
]
}
},
{
"type": "Feature",
"properties": {
"color": "green",
"sort-key": 0,
"image": "interstate_2"
},
"geometry": {
"type": "Point",
"coordinates": [
-6,
29
]
}
}
]
}
}
},
"sprite": "local://sprites/emerald",
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"layers": [
{
"id": "icon",
"type": "symbol",
"source": "geojson",
"layout": {
"symbol-sort-key": ["get", "sort-key"],
"icon-image": ["get", "image"],
"icon-allow-overlap": true,
"icon-ignore-placement": true,
"text-allow-overlap": true,
"text-ignore-placement": true,
"text-field": ["get", "sort-key"],
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
]
},
"paint": {
"text-color": "rgb(255,255,255)",
"text-halo-width": 1,
"text-halo-color": ["get", "color"]
}
}
]
}

0 comments on commit a6b4463

Please sign in to comment.