-
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.
Add render test for symbol-sort-key with ignored icon / text placement (
- Loading branch information
1 parent
e7a6286
commit a6b4463
Showing
3 changed files
with
109 additions
and
1 deletion.
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
Binary file added
BIN
+4.6 KB
test/integration/render-tests/symbol-sort-key/text-ignore-placement/expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions
107
test/integration/render-tests/symbol-sort-key/text-ignore-placement/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,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"] | ||
} | ||
} | ||
] | ||
} |