use setLayerZoomRange , This API causes render event to be continuously triggered without interruption
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**:
1.13
**browser**:
mac intel. Chrome
### Steps to Trigger Behavior
1. add layer
2. edit layer layout properties
3. edit layer zoomRange by setLayerZoomRange
### Link to Demonstration
https://jsbin.com/
### Expected Behavior
by setLayerZoomRange api set to zoom to layer, render event should be interruption when triggled.
### Actual Behavior
render event is continuous.
```javascript
mapbox.addLayer({
id:"testlayer",
source
});
mapbox.setLayerZoomRange('testlayer', 7, 18);
mapbox.on('render', (e: any) => {
console.log('render end');
});
```
if comment mapbox.setLayerZoomRange('testlayer', 7, 18) the code , render event is normal
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
Reproduce the reported behavior in the linked jsbin using mapbox-gl-js 1.13: add the layer, call setLayerZoomRange, and observe the render event. Compare it with the case where setLayerZoomRange is omitted; done means the render event no longer fires continuously after the zoom range is set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100