Method: projects.maps.create
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
สร้างรหัสที่ใช้เพื่อแสดงผลการ์ดแผนที่ที่แสดงผลลัพธ์ของการคํานวณ คุณควรใช้รหัสที่ได้เป็นส่วนหนึ่งของคำขอ GetTile
ใช้ร่วมกับ GetTile
การเรียกใช้ maps.create
จะแสดงนิพจน์และตัวเลือกเอาต์พุตบางอย่าง ผลลัพธ์ของ maps.create
คือรหัสแผนที่ที่แสดงรูปภาพซึ่งเป็นผลมาจากการประเมินนิพจน์นั้นและใช้ตัวเลือกเหล่านั้น จากนั้นจะเรียกใช้ GetTile
เพื่อรับข้อมูลรูปภาพสำหรับชิ้นส่วนของรูปภาพที่แสดงผล ณ ตำแหน่งและการซูมที่ต้องการ รหัสแผนที่จะใช้งานได้เป็นระยะเวลาหนึ่ง (2-3 ชั่วโมง)
กรณีการใช้งานที่พบบ่อยที่สุดสำหรับคู่ปลายทางนี้คือการสร้างวิวพอร์ตแผนที่ด้วยการแสดงภาพผลลัพธ์ของการคํานวณ ผลลัพธ์การคำนวณต้องเป็นไปตามข้อกำหนดที่สมเหตุสมผลสำหรับรูปแบบรูปภาพที่ขอเพื่อให้การดำเนินการนี้เป็นไปได้ โดยเฉพาะอย่างยิ่ง รูปแบบ JPEG หรือ PNG กำหนดให้มีย่านความถี่เอาต์พุต 1 หรือ 3 ย่าน และตัดค่าที่อยู่นอกช่วง 0-255
คำขอ HTTP
POST https://earthengine.googleapis.com/v1beta/{parent=projects/*}/maps
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
parent |
string
ต้องระบุ รายการหลักของคอลเล็กชันแผนที่ (เช่น "projects/*")
การให้สิทธิ์ต้องใช้สิทธิ์ IAM ต่อไปนี้ในทรัพยากร parent ที่ระบุ
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
workloadTag |
string
แท็กที่ผู้ใช้ระบุเพื่อติดตามการคํานวณนี้
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ EarthEngineMap
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ EarthEngineMap
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/earthengine.readonly
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-platform.read-only
ดูข้อมูลเพิ่มเติมได้ที่ OAuth 2.0 Overview
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003e\u003ccode\u003emaps.create\u003c/code\u003e generates a map ID that represents an image created from a provided expression and output options.\u003c/p\u003e\n"],["\u003cp\u003eThis map ID can be used with \u003ccode\u003eGetTile\u003c/code\u003e requests to retrieve image data for specific map tiles.\u003c/p\u003e\n"],["\u003cp\u003eThe primary use case is to visualize computation outputs on a map, requiring the output to be compatible with the image format (e.g., JPEG, PNG).\u003c/p\u003e\n"],["\u003cp\u003eMap IDs are valid for a limited time, typically a few hours.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is required, needing specific IAM permissions or OAuth scopes.\u003c/p\u003e\n"]]],["`maps.create` generates a map ID by evaluating an expression and applying output options. This ID, valid for a few hours, is used in subsequent `GetTile` requests to retrieve image tiles of the computed result at specific locations and zoom levels. The computation output must meet JPEG or PNG format requirements, including one or three bands and value ranges between 0-255. Authorization via specific IAM permission and OAuth scopes is required. A user supplied workload tag can be included to track the computation.\n"],null,["# Method: projects.maps.create\n\nCreates an ID that can be used to render map tiles showing the results of a computation. The resulting ID should be used as part of `GetTile` requests.\n\nThis is used in conjunction with `GetTile`. A call to `maps.create` provides an expression and some output options. The result of `maps.create` is a map ID that represents an image that is the result of evaluating that expression and applying those options. Subsequently, calls to `GetTile` can be made to get image data for a tile of the resulting image, at any desired location and zoom. The map ID will be valid for a moderate period (a few hours).\n\nThe most common use case for this pair of endpoints is to populate a map viewport with a visualization of the output of some computation. In order for that to be possible, the computation output has to meet some reasonable requirements for the requested image format. In particular, JPEG or PNG format requires that there be one or three output bands, and clips values that are outside the 0-255 range.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1beta/{parent=projects/*}/maps`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent of the map collection (e.g., \"projects/\\*\"). Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `earthengine.maps.create` |\n\n### Query parameters\n\n| Parameters ||\n|---------------|-------------------------------------------------------|\n| `workloadTag` | `string` User supplied tag to track this computation. |\n\n### Request body\n\nThe request body contains an instance of [EarthEngineMap](/earth-engine/reference/rest/v1beta/projects.locations.maps#EarthEngineMap).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [EarthEngineMap](/earth-engine/reference/rest/v1beta/projects.locations.maps#EarthEngineMap).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/earthengine.readonly`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/cloud-platform.read-only`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]