Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

ee.data.getMapId

  • 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 likeee.data.getTileUrl orui.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.

UsageReturns
ee.data.getMapId(params,callback)RawMapId
ArgumentTypeDetails
paramsImageVisualizationParametersThe 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".
callbackFunction, optionalAn optional callback. If not supplied, the call is made synchronously.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-02-20 UTC.