Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.Image.getMapId
Stay organized with collections
Save and categorize content based on your preferences.
An imperative function that returns a map ID and optional token, suitable for generating a Map overlay.
Returns an object which may be passed to ee.data.getTileUrl or ui.Map.addLayer. Undefined if a callback was specified.
Usage | Returns | Image.getMapId(visParams, callback) | MapId|Object |
Argument | Type | Details | this: image | Image | The Image instance. |
visParams | ImageVisualizationParameters, optional | The visualization parameters. |
callback | Function, optional | An async callback. If not supplied, the call is made synchronously. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-12-06 UTC.
[null,null,["Last updated 2023-12-06 UTC."],[[["\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. |"]]