公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ui.Map.DrawingTools.set
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设置指定属性的值。如果提供的键不受对象支持,则会抛出错误。查看构造函数的参数,了解可以设置哪些属性。
返回此 ui.data.ActiveDictionary。
用法 | 返回 |
---|
DrawingTools.set(keyOrDict, value) | ui.data.ActiveDictionary |
参数 | 类型 | 详细信息 |
---|
此:ui.data.activedictionary | ui.data.ActiveDictionary | ui.data.ActiveDictionary 实例。 |
keyOrDict | 对象|字符串 | 要设置的属性的键,或要设置在对象上的键值对的字典。 |
value | 对象,可选 | 属性的新值。如果第一个实参是键字符串,则必须提供此实参。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\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. |"]]