plotly / plotly/plotly.js

[BUG]: Clusters within scattermaps fail to display with at least one custom style

Đang mở
#7,742 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
JavaScript
Star
18.3k
Fork
2k
Merge trung bình
2 ngày 12 giờ
Pull request đã merge (30 ngày)
28

Mô tả

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:

Image

Meanwhile, when clusters are enabled, only points not grouped into a cluster (i.e. Honolulu) are visible:

Image

When I checked my console, I saw the following error:

Image

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện lỗi bằng CodePen được liên kết, sử dụng kiểu tùy chỉnh của OpenFreeMap và các cụm scattermap đã bật. Kiểm tra điểm vào của quá trình kết xuất cụm scattermap và yêu cầu phông chữ được nêu trong báo cáo; hoàn thành khi các điểm được phân cụm hiển thị với kiểu đó mà không yêu cầu một phông chữ không khả dụng, hoặc khi giới hạn được hỗ trợ được xác lập rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript
Lĩnh vực
data-visualization, frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.