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.
Send feedback
ee.data.getMapId
Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
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.
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.
Send feedback
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.
Need to tell us more?
[[["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."],[],[],null,[]]