Text Image throw error if cluster dont have Text Image
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
MapboxGl Version 1.8.1
If `text-field` have default a image but for cluster not, it throws an error:
> zone.js:192 Uncaught TypeError: Cannot read property '0' of undefined
at e.set (mapbox-gl.js:29)
at vi.push../src/scripts/mapbox-gl.js.vi.draw (mapbox-gl.js:33)
at oo (mapbox-gl.js:33)
at io (mapbox-gl.js:33)
at Object.symbol (mapbox-gl.js:33)
at po.push../src/scripts/mapbox-gl.js.po.renderLayer (mapbox-gl.js:33)
at po.push../src/scripts/mapbox-gl.js.po.render (mapbox-gl.js:33)
at r._render (mapbox-gl.js:33)
at mapbox-gl.js:33
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
This error comes at time the the cluster is shown.
this doesnt happend if boath have a image or boath have no one.
```
"text-field": [
"case",
[
"has",
"point_count"
],
[
"format",
"TEST"
],
[
"format",
[
"image",
"/assets/images/icons/gas/segment_extension.png"
]
]
]
```
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.
Research direction
The report identifies the text-field expression and the cluster rendering path (`vi.draw`, `po.renderLayer`, and `po.render`) in the bundled `mapbox-gl.js`; start by reproducing the failure with the provided expression in Mapbox GL JS 1.8.1. Done means clustered features without an image render successfully when non-cluster features have one, with coverage for both mixed and matching image cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100