-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle *-rotate for point-placed symbols.
Fixes issue #6075. Does not fix collision detection for point symbols with *-rotation-alignment: map, or for line-placed symbols with *-offset set.
- Loading branch information
Showing
6 changed files
with
142 additions
and
8 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions
57
test/integration/render-tests/icon-rotate/with-offset/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,57 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 128, | ||
"height": 256, | ||
"collisionDebug": true | ||
} | ||
}, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Point", | ||
"coordinates": [ | ||
0, | ||
0 | ||
] | ||
} | ||
} | ||
}, | ||
"sprite": "local://sprites/sprite", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "offset", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"layout": { | ||
"symbol-placement": "point", | ||
"icon-image": "oneway", | ||
"icon-rotate": 45, | ||
"icon-offset": [ | ||
40, | ||
50 | ||
], | ||
"icon-allow-overlap": true | ||
} | ||
}, | ||
{ | ||
"id": "base", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"layout": { | ||
"symbol-placement": "point", | ||
"icon-image": "restaurant-12", | ||
"icon-allow-overlap": true | ||
} | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions
49
test/integration/render-tests/text-rotate/with-offset/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,49 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"width": 128, | ||
"height": 256, | ||
"collisionDebug": true | ||
} | ||
}, | ||
"sources": { | ||
"geojson": { | ||
"type": "geojson", | ||
"data": { | ||
"type": "Point", | ||
"coordinates": [ | ||
0, | ||
0 | ||
] | ||
} | ||
} | ||
}, | ||
"glyphs": "local://glyphs/{fontstack}/{range}.pbf", | ||
"layers": [ | ||
{ | ||
"id": "background", | ||
"type": "background", | ||
"paint": { | ||
"background-color": "white" | ||
} | ||
}, | ||
{ | ||
"id": "symbol", | ||
"type": "symbol", | ||
"source": "geojson", | ||
"layout": { | ||
"text-field": "Test", | ||
"text-font": [ | ||
"Open Sans Semibold", | ||
"Arial Unicode MS Bold" | ||
], | ||
"text-rotate": 45, | ||
"text-offset": [ | ||
3, | ||
6 | ||
] | ||
} | ||
} | ||
] | ||
} |