Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
ee.Image.getMap
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.getMap(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-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],["The `Image.getMap` function generates a map overlay's ID and an optional token. It accepts an Image instance, optional visualization parameters, and an optional asynchronous callback function. If a callback is provided, the function doesn't return a value; otherwise, it synchronously returns either a MapId or an object that can be used for generating a tile URL or adding a layer to a map. Visualization parameters define how the image will be displayed.\n"]]