Map.onTileLoaded
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ลงทะเบียนการเรียกกลับที่จะทริกเกอร์เมื่อโหลดไทล์แผนที่แล้ว
แสดงผลรหัสที่ส่งไปยัง unlisten() เพื่อยกเลิกการลงทะเบียนแฮนเดิลการเรียกกลับ
การใช้งาน | การคืนสินค้า |
---|
Map.onTileLoaded(callback) | สตริง |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
callback | ฟังก์ชัน | เรียกใช้ด้วยอาร์เรย์ของค่าต่อเลเยอร์ แต่ละค่าคือเศษส่วนของไทล์ที่ยังรอดำเนินการอยู่ โดยค่า 0 หมายความว่าไม่มีไทล์ที่จะโหลดสำหรับเลเยอร์อีกต่อไป |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eMap.onTileLoaded()\u003c/code\u003e registers a callback function that triggers when a map tile loads.\u003c/p\u003e\n"],["\u003cp\u003eThe callback function receives an array indicating the loading progress of each layer, with 0 signifying complete tile loading for that layer.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns a unique ID that can be used with \u003ccode\u003eunlisten()\u003c/code\u003e to remove the registered callback.\u003c/p\u003e\n"]]],[],null,["# Map.onTileLoaded\n\n\u003cbr /\u003e\n\nRegisters a callback that's fired when a map tile has been loaded.\n\n\u003cbr /\u003e\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|------------------------------|---------|\n| `Map.onTileLoaded(callback)` | String |\n\n| Argument | Type | Details |\n|------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `callback` | Function | Called with an array of per layer values. Each value is the fraction of tiles still pending: a value of 0 means there are no more tiles to load for the layer. |"]]