icon size jump using a nested data expression in a zoom expression
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**: `v1.4.0`
**browser**: Google Chrome `Version 77.0.3865.120 (Official Build) (64-bit)`
### Steps to Trigger Behavior
Create a zoom expression for the `icon-size` property with a data condition within it. i.e.
```js
[
'interpolate',
['exponential', 1.5],
['zoom'],
8,
['match', ['get', 'iso_3166_1'], ['JP'], 0.75, 1],
14,
1
]
```
### Link to Demonstration
The bug looks like this:

The test case I have for this is pretty subtle and doesn't totally match the gif above. It's possible the addition of collision detection where there are more features on the map is causing it? https://jsfiddle.net/tristen/zn7ks40L/
### Expected Behavior
There would be no jump in size but that the size of the icon would interpolate across the zoom expression set.
### Actual Behavior
Icon jumps down in size when zooming from one zoom stop to another.
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
Start by reproducing the nested data expression for icon-size from the issue and the linked JSFiddle in Chrome, comparing behavior across the zoom stops. Investigate whether collision detection contributes to the size jump, and consider the issue done when the icon size interpolates continuously without the reported downward jump.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100