ee.Image.getThumbURL
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รับ URL ของภาพขนาดย่อสำหรับรูปภาพนี้
แสดงผล URL ของภาพขนาดย่อ หรือไม่แสดงผลหากมีการระบุการเรียกกลับ
การใช้งาน | การคืนสินค้า |
---|
Image.getThumbURL(params, callback) | Object|String |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ image | รูปภาพ | อินสแตนซ์รูปภาพ |
params | วัตถุ | พารามิเตอร์ที่เหมือนกับ ee.data.getMapId และพารามิเตอร์ต่อไปนี้ (ไม่บังคับ)
dimensions (ตัวเลขหรือคู่ตัวเลขในรูปแบบ WIDTHxHEIGHT) ขนาดสูงสุดของภาพขนาดย่อที่จะแสดงในหน่วยพิกเซล หากส่งค่าเพียงค่าเดียว ระบบจะใช้ค่าดังกล่าวเป็นค่าสูงสุด และจะคำนวณมิติข้อมูลอื่นๆ โดยการปรับขนาดตามสัดส่วน |
region ภูมิภาคภูมิสารสนเทศเชิงพื้นที่ของรูปภาพที่จะแสดงผล อาจเป็น ee.Geometry, GeoJSON หรืออาร์เรย์ของจุดละติจูด/ลองจิจูด (E,S,W,N) หากไม่ได้ตั้งค่าไว้ ค่าเริ่มต้นจะเป็นรูปภาพขอบเขต |
format (สตริง) เป็น "png" หรือ "jpg" |
|
callback | ฟังก์ชัน (ไม่บังคับ) | การเรียกกลับที่ไม่บังคับ หากไม่ได้ระบุไว้ ระบบจะโทรแบบพร้อมกัน |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\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. |"]]