Tile dùng cho toạ độ ô này. Nếu bạn không muốn cung cấp một thẻ thông tin cho toạ độ thẻ thông tin này, hãy trả về NO_TILE. Nếu không thể tìm thấy thẻ thông tin tại thời điểm này, bạn có thể trả về giá trị rỗng và các yêu cầu khác có thể được thực hiện theo thời gian đợi luỹ thừa.
công khai
tóm tắt
URL
getTileUrl(int x, int y, int thu phóng)
Trả về URL trỏ đến hình ảnh sẽ được dùng cho thẻ thông tin này. Nếu không tìm thấy hình ảnh nào trong yêu cầu ban đầu, các yêu cầu khác sẽ được thực hiện theo thời gian đợi luỹ thừa. Nếu bạn không muốn cung cấp hình ảnh cho toạ độ thẻ thông tin này, hãy trả về giá trị rỗng.
Các tham số
x
Toạ độ x của ô. Giá trị này sẽ nằm trong khoảng từ [0, 2zoom – 1].
năm
Toạ độ y của ô. Giá trị này sẽ nằm trong khoảng từ [0, 2zoom – 1].
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-09-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eUrlTileProvider\u003c/code\u003e is a partial implementation of \u003ccode\u003eTileProvider\u003c/code\u003e simplifying tile creation by using image URLs.\u003c/p\u003e\n"],["\u003cp\u003eIt requires all tile images to have identical dimensions, specified during construction.\u003c/p\u003e\n"],["\u003cp\u003eThe core functionality involves implementing \u003ccode\u003egetTileUrl\u003c/code\u003e to provide URLs for tile images based on coordinates and zoom level.\u003c/p\u003e\n"],["\u003cp\u003eIf a tile image is unavailable, the method should return null, triggering retry attempts with exponential backoff.\u003c/p\u003e\n"]]],["`UrlTileProvider` implements `TileProvider`, requiring a URL for an image. It uses a constructor defining tile image width and height. `getTile(int x, int y, int zoom)` returns a `Tile` for coordinates, or `NO_TILE` if none exists, or null if not found. `getTileUrl(int x, int y, int zoom)` returns the image's URL; if no image is available, it returns null. The class assumes all images have uniform dimensions.\n"],null,[]]