ee.data.getMapId
Get a Map ID for a given asset
Returns the mapId call results, which may be passed to ee.data.getTileUrl or ui.Map.addLayer. Null if a callback is specified.
Usage | Returns |
---|
ee.data.getMapId(params, callback) | RawMapId |
Argument | Type | Details |
---|
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". |
|
callback | Function, optional | An optional 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 2024-02-20 UTC.
[null,null,["Last updated 2024-02-20 UTC."],[[["`ee.data.getMapId` retrieves the map ID of a given Earth Engine asset, which can be used to display the asset on a map."],["The function requires visualization parameters, including the image, bands, and visualization settings like min, max, and palette."],["It can be used synchronously or asynchronously with a callback function."],["The returned map ID can be utilized with `ee.data.getTileUrl` or `ui.Map.addLayer` for further map interactions."]]],[]]