AI-generated Key Takeaways
-
ee.data.getMapIdis used to obtain a Map ID for a given asset. -
The function returns the mapId call results, which can be used with other functions like
ee.data.getTileUrlorui.Map.addLayer. -
Optional parameters for visualization can be provided as a JavaScript object, including options for bands, min/max values, gain, bias, gamma, palette, opacity, and format.
-
An optional callback function can be provided for asynchronous calls.
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 |
params
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

