ee.data.getMapId
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รับรหัสแผนที่สำหรับชิ้นงานที่ต้องการ
แสดงผลลัพธ์การเรียกใช้ mapId ซึ่งอาจส่งไปยัง ee.data.getTileUrl หรือ ui.Map.addLayer เป็น Null หากมีการระบุการเรียกกลับ
การใช้งาน | การคืนสินค้า |
---|
ee.data.getMapId(params, callback) | RawMapId |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
params | ImageVisualizationParameters | พารามิเตอร์การแสดงภาพเป็นออบเจ็กต์ JavaScript (ฝั่งไคลเอ็นต์) สำหรับรูปภาพและ ImageCollection
image (สตริง JSON) รูปภาพที่จะแสดง |
version (หมายเลข) หมายเลขเวอร์ชันของรูปภาพ (หรือล่าสุด) |
bands (สตริงที่คั่นด้วยคอมมา) รายการชื่อแบนด์ที่คั่นด้วยคอมมาเพื่อแมปกับ RGB |
min (ตัวเลขที่คั่นด้วยคอมมา) ค่า (หรือค่าหนึ่งค่าต่อแถบ) ที่จะแมปกับ 00 |
max (ตัวเลขที่คั่นด้วยคอมมา) ค่า (หรือค่าหนึ่งค่าต่อแบนด์) ที่จะแมปกับ FF |
gain (ตัวเลขที่คั่นด้วยคอมมา) เกน (หรือ 1 ต่อแบนด์) เพื่อแมปกับ 00-FF |
bias (ตัวเลขที่คั่นด้วยคอมมา) ออฟเซ็ต (หรือ 1 ต่อแบนด์) เพื่อแมปกับ 00-FF |
gamma (ตัวเลขที่คั่นด้วยคอมมา) ปัจจัยการแก้ไขแกมมา (หรือ 1 ต่อแถบ) |
palette (สตริงที่คั่นด้วยคอมมา) รายการสตริงสีในรูปแบบ CSS (ตัวอย่างแถบเดียวเท่านั้น) |
opacity (ตัวเลข) ตัวเลขระหว่าง 0 ถึง 1 สำหรับความทึบแสง |
format (สตริง) "jpg" หรือ "png" |
|
callback | ฟังก์ชัน (ไม่บังคับ) | การเรียกกลับที่ไม่บังคับ หากไม่ได้ระบุไว้ ระบบจะโทรแบบพร้อมกัน |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eee.data.getMapId\u003c/code\u003e retrieves the map ID of a given Earth Engine asset, which can be used to display the asset on a map.\u003c/p\u003e\n"],["\u003cp\u003eThe function requires visualization parameters, including the image, bands, and visualization settings like min, max, and palette.\u003c/p\u003e\n"],["\u003cp\u003eIt can be used synchronously or asynchronously with a callback function.\u003c/p\u003e\n"],["\u003cp\u003eThe returned map ID can be utilized with \u003ccode\u003eee.data.getTileUrl\u003c/code\u003e or \u003ccode\u003eui.Map.addLayer\u003c/code\u003e for further map interactions.\u003c/p\u003e\n"]]],[],null,["# ee.data.getMapId\n\n\u003cbr /\u003e\n\nGet a Map ID for a given asset\n\n\u003cbr /\u003e\n\nReturns the mapId call results, which may be passed to ee.data.getTileUrl or ui.Map.addLayer. Null if a callback is specified.\n\n| Usage | Returns |\n|------------------------------------------|----------|\n| `ee.data.getMapId(params, `*callback*`)` | RawMapId |\n\n| Argument | Type | Details |\n|------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `params` | ImageVisualizationParameters | The visualization parameters as a (client-side) JavaScript object. For Images and ImageCollections: |----------------------------------------------------------------------------------------------------| | ` image ` (JSON string) The image to render. | | ` version ` (number) Version number of image (or latest). | | ` bands ` (comma-separated strings) Comma-delimited list of band names to be mapped to RGB. | | ` min ` (comma-separated numbers) Value (or one per band) to map onto 00. | | ` max ` (comma-separated numbers) Value (or one per band) to map onto FF. | | ` gain ` (comma-separated numbers) Gain (or one per band) to map onto 00-FF. | | ` bias ` (comma-separated numbers) Offset (or one per band) to map onto 00-FF. | | ` gamma ` (comma-separated numbers) Gamma correction factor (or one per band). | | ` palette ` (comma-separated strings) List of CSS-style color strings (single-band previews only). | | ` opacity ` (number) a number between 0 and 1 for opacity. | | ` format ` (string) Either \"jpg\" or \"png\". | |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |"]]