Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

high-DPI support

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
json
Lĩnh vực
documentation

Hướng nghiên cứu

Xem xét đặc tả TileJSON hiện có và các phần bổ sung dpis và {r} được đề xuất trong issue, sau đó kiểm tra cách nên xử lý khả năng tương thích ngược cho các consumer hiện có. Công việc được xem là hoàn tất khi một biểu diễn high-DPI đã được thống nhất và hành vi của URL-template được ghi lại, đồng thời không để vấn đề tương thích chưa được giải quyết.

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

Mô tả

v4

TileJSON should have a means of:

  • indicating when a source supports high-DPI versions of base tiles, and at what DPI multipliers (@2x, @4x, etc)
  • specifying how URLs for high-DPI tiles are constructed

Without such a specification, consumers must have hard-coded knowledge of a source's support for high-DPI tiles and typically resort to string munging to generate the appropriate URLs. These are exactly the sort of deficiencies that TileJSON is designed to eliminate.

One approach would be to have an array-valued property that lists supported DPI multipliers and a new interpolation key for tile URL templates. E.g.:

{
  ...
  "dpis": [1, 2, 4],
  "tiles": ["http://example.com/{z}/{x}/{y}{r}.png"]
}

Where it is specified that {r} is replaced with the pixel ratio ⇢ string mapping of 1 ⇢ "", 2 ⇢ "@2x", 4 ⇢ "@4x", and consumers may decide which of the pixel ratio options to use based on device characteristics. Alternatively this mapping could be explicitly supplied:

{
  ...
  "dpis": {
    "1": "",
    "2": "@2x",
    "4": "@4x"
  },
  "tiles": ["http://example.com/{z}/{x}/{y}{r}.png"]
}

These approaches introduce a backward compatibility issue however, in that existing TileJSON consumers will not be prepared to interpolate a new template value and thus cannot consume TileJSON that uses it.

cc @yhahn @mourner @tmcw

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
298
Fork
51
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

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.

Issue khác của mapbox/tilejson-spec

Tất cả issue của mapbox/tilejson-spec

Issue tương tự

Thêm issue về Documentation

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.