Creates a task to export an Image as a pyramid of map tiles. Exports 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 ope
(
image: _arg_types.Image,
description: str = 'myExportMapTask',
bucket: str | None = None,
fileFormat: str | None = None,
path: str | None = None,
writePublicTiles: bool | None = None,
maxZoom: int | None = None,
scale: float | None = None,
minZoom: int | None = None,
region: Any | None = None,
skipEmptyTiles: bool | None = None,
mapsApiKey: str | None = None,
bucketCorsUris: list[str] | None = None,
priority: int | None = None,
**kwargs,
)
| 524 | # pylint: disable=unused-argument |
| 525 | @staticmethod |
| 526 | def toCloudStorage( |
| 527 | image: _arg_types.Image, |
| 528 | description: str = 'myExportMapTask', |
| 529 | bucket: str | None = None, |
| 530 | fileFormat: str | None = None, |
| 531 | path: str | None = None, |
| 532 | writePublicTiles: bool | None = None, |
| 533 | maxZoom: int | None = None, |
| 534 | scale: float | None = None, |
| 535 | minZoom: int | None = None, |
| 536 | region: Any | None = None, |
| 537 | skipEmptyTiles: bool | None = None, |
| 538 | mapsApiKey: str | None = None, |
| 539 | bucketCorsUris: list[str] | None = None, |
| 540 | priority: int | None = None, |
| 541 | **kwargs, |
| 542 | ) -> Task: |
| 543 | """Creates a task to export an Image as a pyramid of map tiles. |
| 544 | |
| 545 | Exports a rectangular pyramid of map tiles for use with web map |
| 546 | viewers. The map tiles will be accompanied by a reference |
| 547 | index.html file that displays them using the Google Maps API, |
| 548 | and an earth.html file for opening the map on Google Earth. |
| 549 | |
| 550 | Args: |
| 551 | image: The image to export as tiles. |
| 552 | description: Human-readable name of the task. |
| 553 | bucket: The destination bucket to write to. |
| 554 | fileFormat: The map tiles' file format, one of 'auto', 'png', |
| 555 | or 'jpeg'. Defaults to 'auto', which means that opaque tiles |
| 556 | will be encoded as 'jpg' and tiles with transparency will be |
| 557 | encoded as 'png'. |
| 558 | path: The string used as the output's path. A trailing '/' |
| 559 | is optional. Defaults to the task's description. |
| 560 | writePublicTiles: Whether to write public tiles instead of using the |
| 561 | bucket's default object ACL. Defaults to True and requires the |
| 562 | invoker to be an OWNER of bucket. |
| 563 | maxZoom: The maximum zoom level of the map tiles to export. |
| 564 | scale: The max image resolution in meters per pixel, as an alternative |
| 565 | to 'maxZoom'. The scale will be converted to the most appropriate |
| 566 | maximum zoom level at the equator. |
| 567 | minZoom: The optional minimum zoom level of the map tiles to export. |
| 568 | region: The lon,lat coordinates for a LinearRing or Polygon |
| 569 | specifying the region to export. Can be specified as a nested |
| 570 | lists of numbers or a serialized string. Map tiles will be |
| 571 | produced in the rectangular region containing this geometry. |
| 572 | Defaults to the image's region. |
| 573 | skipEmptyTiles: If true, skip writing empty (i.e. fully-transparent) |
| 574 | map tiles. Defaults to false. |
| 575 | mapsApiKey: Used in index.html to initialize the Google Maps API. This |
| 576 | removes the "development purposes only" message from the map. |
| 577 | bucketCorsUris: A list of domains that are allowed to retrieve the |
| 578 | exported tiles from JavaScript. Setting the tiles to public is not |
| 579 | enough to allow them to be accessible by a web page, so you must |
| 580 | explicitly give domains access to the bucket. This is known as |
| 581 | Cross-Origin-Resource-Sharing, or CORS. You can allow all domains to |
| 582 | have access using "*", but this is generally discouraged. See |
| 583 | https://cloud.google.com/storage/docs/cross-origin for more details. |