公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ui.url.set
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设置网页网址片段的值。该 fragment 会对键和值的字典进行编码。如果将字典作为第一个实参提供,则该字典中的键值对将被编码并替换当前的网址片段。如果提供了键字符串,则仅更新该键(及其值,即第二个实参),网址 fragment 的其余部分保持不变。
用法 | 返回 |
---|
ui.url.set(keyOrDict, value) | |
参数 | 类型 | 详细信息 |
---|
keyOrDict | Dictionary<Object>|String | 用于更新网址片段中单个值的键,或将替换现有网址片段的键/值对字典。字典值必须是字符串、数字或布尔值类型。 |
value | Boolean|Number|String,可选 | 要与单个键关联的新值。如果第一个实参是字符串,则此实参是必需的,否则会被忽略。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003ccode\u003eui.url.set\u003c/code\u003e lets you modify the URL fragment, which stores data as key-value pairs.\u003c/p\u003e\n"],["\u003cp\u003eYou can either replace the entire fragment with a new dictionary or update a single key's value.\u003c/p\u003e\n"],["\u003cp\u003eDictionary values in the URL fragment must be strings, numbers, or booleans.\u003c/p\u003e\n"]]],[],null,["# ui.url.set\n\n\u003cbr /\u003e\n\nSets the value of the page's URL fragment. The fragment encodes a dictionary of keys and values. If a dictionary is supplied as the first argument, the key/value pairs in that dictionary will be encoded and replace the current URL fragment. If a key string is provided, then only that key (and its value, the second argument) are updated, and the rest of the URL fragment is unchanged.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------------------|---------|\n| `ui.url.set(keyOrDict, `*value*`)` | |\n\n| Argument | Type | Details |\n|-------------|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `keyOrDict` | Dictionary\\\u003cObject\\\u003e\\|String | Either a key to update a single value in the URL fragment, or a dictionary of key/value pairs which will replace the existing URL fragment. Dictionary values must be of type string, number, or boolean. |\n| `value` | Boolean\\|Number\\|String, optional | The new value to associate with a single key. This is required when the first argument is a string and is otherwise ignored. |"]]