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.data.getMapId
Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
ee.data.getMapId is 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.getTileUrl or ui.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.
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.