ui.Map.DrawingTools.set
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מגדיר את הערך של מאפיין נתון. הפונקציה מחזירה שגיאה אם המפתח שסופק לא נתמך על ידי האובייקט. בודקים את הפרמטרים של ה-constructor כדי לראות אילו מאפיינים אפשר להגדיר.
מחזירה את ui.data.ActiveDictionary.
שימוש | החזרות |
---|
DrawingTools.set(keyOrDict, value) | ui.data.ActiveDictionary |
ארגומנט | סוג | פרטים |
---|
זה: ui.data.activedictionary | ui.data.ActiveDictionary | המופע ui.data.ActiveDictionary. |
keyOrDict | אובייקט|מחרוזת | המפתח של המאפיין שרוצים להגדיר או מילון של צמדי מפתח/ערך שרוצים להגדיר באובייקט. |
value | אובייקט, אופציונלי | הערך החדש של המאפיין. הארגומנט הזה נדרש כשהארגומנט הראשון הוא מחרוזת של מפתח. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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. |"]]