Export.map.toCloudStorage

Creates a batch task to export an Image as a rectangular pyramid of map tiles for use with web map viewers. The map tiles will be accompanied by a reference index.html file that displays them using the Google Maps API, and an earth.html file for opening the map on Google Earth.

UsageReturns
Export.map.toCloudStorage(image, description, bucket, fileFormat, path, writePublicTiles, maxZoom, scale, minZoom, region, skipEmptyTiles, mapsApiKey, bucketCorsUris, priority)
ArgumentTypeDetails
imageImageThe image to export as tiles.
descriptionString, optionalA human-readable name of the task. Defaults to "myExportMapTask".
bucketString, optionalThe destination bucket to write to.
fileFormatString, optionalThe map tiles' file format, one of "auto", "png", or "jpg". Defaults to "auto", which means that opaque tiles will be encoded as "jpg" and tiles with transparency will be encoded as "png".
pathString, optionalThe string used as the output's path. A trailing "/" is optional. Defaults to the task's description.
writePublicTilesBoolean, optionalWhether to write public tiles instead of using the bucket's default object ACL. Defaults to true and requires invoker to be OWNER of bucket.
maxZoomNumber, optionalThe maximum zoom level of the map tiles to export.
scaleNumber, optionalThe max image resolution in meters per pixel, as an alternative to "maxZoom". The scale will be converted to the most appropriate maximum zoom level at the equator.
minZoomNumber, optionalThe optional minimum zoom level of the map tiles to export. Defaults to zero.
regionGeometry.LinearRing|Geometry.Polygon|String, optionalA LinearRing, Polygon, or coordinates representing region to export. These may be specified as the Geometry objects or coordinates serialized as a string. Map tiles will be produced in the rectangular region containing this geometry.
skipEmptyTilesBoolean, optionalIf true, skip writing empty (i.e. fully-transparent) map tiles. Defaults to false. Only supported on GeoTIFF exports.
mapsApiKeyString, optionalUsed in index.html to initialize the Google Maps API. This removes the "development purposes only" message from the map.
bucketCorsUrisList, optionalA list of domains (e.g. https://code.earthengine.google.com) that are allowed to retrieve the exported tiles from JavaScript. Setting the tiles to public is not enough to allow them to be accessible by a web page, so you must explicitly give domains access to the bucket. This is known as Cross-Origin-Resource-Sharing, or CORS. You can allow all domains to have access using "*", but this is generally discouraged. See https://cloud.google.com/storage/docs/cross-origin for more details.
priorityNumber, optionalThe priority of the task within the project. Higher priority tasks are scheduled sooner. Must be an integer between 0 and 9999. Defaults to 100.