Earth Engine is introducing noncommercial quota tiers to safeguard shared compute resources and ensure reliable performance for everyone. All noncommercial projects will need to select a quota tier by April 27, 2026 or will use the Community Tier by default. Tier quotas will take effect for all projects (regardless of tier selection date) on April 27, 2026. Learn more.
ee.data.getMapId
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-02-20 UTC."],[],[]]