Respect text-offset in line-placed symbol collision handling
@ChrisLoer is already working on this.
Since May 5, 2018.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
We currently do not respect the value of `text-offset` when determining whether two symbol instances collide.
Example -- in this style:
```js
{
"version": 8,
"metadata": {
"test": {
"height": 64,
"collisionDebug": true
}
},
"center": [ 0, 0 ],
"zoom": 0,
"sources": {
"geojson": {
"type": "geojson",
"data": {
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[-20, -20],
[20, -20],
[20, 20],
[-20, 20]
]
}
}
}
},
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
"layers": [
{
"id": "guid",
"type": "line",
"source": "geojson"
},
{
"id": "text",
"type": "symbol",
"source": "geojson",
"layout": {
"symbol-placement": "line",
"symbol-spacing": 115,
"text-size": 10,
"text-allow-overlap": false,
"text-ignore-placement": false,
"text-field": "A",
"text-font": [
"Open Sans Semibold",
"Arial Unicode MS Bold"
],
"text-keep-upright": false,
"text-offset": [0, -3]
}
}
]
}
```
We'd expect only one of the 'A' instances to be rendered, but both are:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.