ui.Map.DrawingTools.set
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตั้งค่าของพร็อพเพอร์ตี้ที่ระบุ แสดงข้อผิดพลาดหากออบเจ็กต์ไม่รองรับคีย์ที่ระบุ ดูพารามิเตอร์ของตัวสร้างเพื่อดูว่าตั้งค่าพร็อพเพอร์ตี้ใดได้บ้าง
แสดงผล ui.data.ActiveDictionary นี้
การใช้งาน | การคืนสินค้า |
---|
DrawingTools.set(keyOrDict, value) | ui.data.ActiveDictionary |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ ui.data.activedictionary | ui.data.ActiveDictionary | อินสแตนซ์ ui.data.ActiveDictionary |
keyOrDict | Object|String | คีย์ของพร็อพเพอร์ตี้ที่จะตั้งค่า หรือพจนานุกรมของคู่คีย์/ค่าที่จะตั้งค่าในออบเจ็กต์ |
value | ออบเจ็กต์ (ไม่บังคับ) | ค่าใหม่ของพร็อพเพอร์ตี้ ต้องระบุเมื่ออาร์กิวเมนต์แรกเป็นสตริงคีย์ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eSets the value of a specified property within a ui.data.ActiveDictionary object.\u003c/p\u003e\n"],["\u003cp\u003eThrows an error if the provided key is not a supported property, refer to the constructor parameters for valid properties.\u003c/p\u003e\n"],["\u003cp\u003eAccepts either a single key-value pair or a dictionary of key-value pairs to modify the object's properties.\u003c/p\u003e\n"],["\u003cp\u003eReturns the updated ui.data.ActiveDictionary instance, enabling method chaining.\u003c/p\u003e\n"]]],["The `set` method of `ui.data.ActiveDictionary` modifies object properties. It accepts either a `keyOrDict` (string or object) and optionally a `value`. If `keyOrDict` is a string, `value` is mandatory, representing the new property value. If `keyOrDict` is an object it is a dictionary containing key/value pairs that will be applied to the object. Invalid keys trigger an error. It returns the modified `ui.data.ActiveDictionary` instance.\n"],null,["# ui.Map.DrawingTools.set\n\n\u003cbr /\u003e\n\nSets the value of a given property. Throws an error if the key provided is not supported by the object. Look at the constructor's parameters to see which properties can be set.\n\n\u003cbr /\u003e\n\nReturns this ui.data.ActiveDictionary.\n\n| Usage | Returns |\n|------------------------------------------|--------------------------|\n| DrawingTools.set`(keyOrDict, `*value*`)` | ui.data.ActiveDictionary |\n\n| Argument | Type | Details |\n|----------------------------------|--------------------------|------------------------------------------------------------------------------------------------|\n| this: `ui.data.activedictionary` | ui.data.ActiveDictionary | The ui.data.ActiveDictionary instance. |\n| `keyOrDict` | Object\\|String | Either the key of the property to set or a dictionary of key/value pairs to set on the object. |\n| `value` | Object, optional | The property's new value. This is required when the first argument is a key string. |"]]