maptalks / maptalks/maptalks.markercluster
遍历图层要素控制要素显示隐藏,当所有要素隐藏之后,缩放地图会报错
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 49
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
代码:
...
clusterLayer.getGeometries((geometry) => {
geometry[geometry.isVisible() ? 'hide' : 'show']();
});
...
报错信息:
Uncaught TypeError: Cannot read properties of undefined (reading 'getMin')
Contributor guide
No contributing guide indexed for this repository
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 with the clusterLayer.getGeometries callback shown in the issue and reproduce the error by hiding every geometry before zooming the map. Trace the zoom path that reaches the undefined getMin call; done when zooming remains error-free after all layer features are hidden.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100