公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.getThumbURL
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
获取相应图片的缩略图网址。
返回缩略图网址,如果指定了回调,则返回 undefined。
用法 | 返回 |
---|
Image.getThumbURL(params, callback) | 对象|字符串 |
参数 | 类型 | 详细信息 |
---|
此:image | 图片 | Image 实例。 |
params | 对象 | 与 ee.data.getMapId 相同的参数,以及可选参数:
dimensions (一个数字或一对数字,格式为 WIDTHxHEIGHT)要呈现的缩略图的最大尺寸(以像素为单位)。如果只传递一个数字,则将其用作最大值,并通过按比例缩放计算另一个维度。 |
region 要渲染的图片的地理空间区域,可以是 ee.Geometry、GeoJSON 或纬度/经度点(东、南、西、北)的数组。如果未设置,则默认值为边界图像。 |
format (字符串)可以是“png”或“jpg”。 |
|
callback | 函数(可选) | 可选的回调。如果未提供,则以同步方式进行调用。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe \u003ccode\u003eImage.getThumbURL\u003c/code\u003e function retrieves a thumbnail URL for a given image, offering options to customize dimensions, region, and format.\u003c/p\u003e\n"],["\u003cp\u003eThis function accepts parameters similar to \u003ccode\u003eee.data.getMapId\u003c/code\u003e to specify the desired thumbnail characteristics.\u003c/p\u003e\n"],["\u003cp\u003eUsers can provide a callback function for asynchronous execution or receive the URL directly in a synchronous call.\u003c/p\u003e\n"],["\u003cp\u003eThe thumbnail size can be controlled by specifying dimensions, with proportional scaling applied if only one dimension is given.\u003c/p\u003e\n"],["\u003cp\u003eThe region of the image to be included in the thumbnail can be defined using various geometry formats, defaulting to the image bounds if not specified.\u003c/p\u003e\n"]]],[],null,["# ee.Image.getThumbURL\n\n\u003cbr /\u003e\n\nGet a thumbnail URL for this image.\n\n\u003cbr /\u003e\n\nReturns a thumbnail URL, or undefined if a callback was specified.\n\n| Usage | Returns |\n|-------------------------------------------|----------------|\n| Image.getThumbURL`(params, `*callback*`)` | Object\\|String |\n\n| Argument | Type | Details |\n|---------------|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `image` | Image | The Image instance. |\n| `params` | Object | Parameters identical to ee.data.getMapId, plus, optionally: |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` dimensions ` (a number or pair of numbers in format WIDTHxHEIGHT) Maximum dimensions of the thumbnail to render, in pixels. If only one number is passed, it is used as the maximum, and the other dimension is computed by proportional scaling. | | ` region ` Geospatial region of the image to render, it may be an ee.Geometry, GeoJSON, or an array of lat/lon points (E,S,W,N). If not set the default is the bounds image. | | ` format ` (string) Either 'png' or 'jpg'. | |\n| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |"]]