[BUG]: Clusters within scattermaps fail to display with at least one custom style
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
Description
I am attempting to add clusters to a Plotly.js scattermap that uses a custom style ("https://tiles.openfreemap.org/styles/bright") for the map's style argument. When clusters are disabled, the map appears as expected:
Meanwhile, when clusters are enabled, only points not grouped into a cluster (i.e. Honolulu) are visible:
When I checked my console, I saw the following error:
Basically, the clusters appear to require a specific font (Open Sans Regular) for the cluster labels, but this font isn't available within openfreemap's server. (In other words, Plotly is requesting font information from https://tiles.openfreemap.org/fonts/Open%20Sans%20Regular/0-255.pbf , but that page shows a 404 Not Found message.)
One option would of course be for OpenFreeMap to add this font to their server, but it would be preferable to modify the library, if possible, to not require this particular font. (If there's already an option to do so, please let me know.) If that wouldn't be possible, perhaps the library could be updated to show clusters but not labels? That would still be a major improvement.
Thank you in advance for your assistance!
Steps to reproduce
Here is a Codepen that demonstrates this functionality. Note that, if you zoom in enough, the underlying clusters' dots will begin to appear. Thus, the issue is with clusters rather than their data.
Notes
One of my reasons for using this custom library is that, based on my correspondence with Carto, our organization may need to pay a substantial amount of money to use Carto's own tiles for our work. This is not the case with OpenFreeMap, which is why I strongly prefer using them in place of Carto. If I'm misunderstanding this licensing situation, just let me know.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 OpenFreeMap 自定义样式和已启用的 scattermap 聚类,通过链接的 CodePen 重现该故障。检查 scattermap 聚类渲染入口以及报告中显示的字体请求;当聚类点能够以该样式进行渲染且不需要不可用的字体,或明确确定受支持的限制时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization, frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100