公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Image.getMapId
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
這項命令式函式會傳回地圖 ID 和選用權杖,適合用於產生地圖疊加層。
傳回可傳遞至 ee.data.getTileUrl 或 ui.Map.addLayer 的物件。如果指定了回呼,則為未定義。
用量 | 傳回 |
---|
Image.getMapId(visParams, callback) | MapId|Object |
引數 | 類型 | 詳細資料 |
---|
這個:image | 圖片 | Image 執行個體。 |
visParams | ImageVisualizationParameters (選用) | 視覺化參數。 |
callback | 函式 (選用) | 非同步回呼。如未提供,系統會同步發出呼叫。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eImage.getMapId\u003c/code\u003e generates a map ID and an optional token for creating map overlays from Earth Engine images.\u003c/p\u003e\n"],["\u003cp\u003eThis function returns an object compatible with \u003ccode\u003eee.data.getTileUrl\u003c/code\u003e and \u003ccode\u003eui.Map.addLayer\u003c/code\u003e for displaying the image on a map.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the visualization of the image overlay using optional visualization parameters.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eImage.getMapId\u003c/code\u003e can be used synchronously, returning the map ID object directly, or asynchronously with a callback function.\u003c/p\u003e\n"]]],[],null,["# ee.Image.getMapId\n\n\u003cbr /\u003e\n\nAn imperative function that returns a map ID and optional token, suitable for generating a Map overlay.\n\n\u003cbr /\u003e\n\nReturns an object which may be passed to ee.data.getTileUrl or ui.Map.addLayer. Undefined if a callback was specified.\n\n| Usage | Returns |\n|------------------------------------------------|---------------|\n| Image.getMapId`(`*visParams* `, `*callback*`)` | MapId\\|Object |\n\n| Argument | Type | Details |\n|---------------|----------------------------------------|---------------------------------------------------------------------|\n| this: `image` | Image | The Image instance. |\n| `visParams` | ImageVisualizationParameters, optional | The visualization parameters. |\n| `callback` | Function, optional | An async callback. If not supplied, the call is made synchronously. |"]]