公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ui.url.set
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
設定網頁網址片段的值。片段會編碼鍵和值的字典。如果以字典做為第一個引數,系統會編碼該字典中的鍵/值組合,並取代目前的網址片段。如果提供鍵字串,系統只會更新該鍵 (和其值,即第二個引數),網址片段的其餘部分則維持不變。
用量 | 傳回 |
---|
ui.url.set(keyOrDict, value) | |
引數 | 類型 | 詳細資料 |
---|
keyOrDict | Dictionary<Object>|String | 更新網址片段中單一值的鍵,或鍵/值組合的字典 (會取代現有的網址片段)。字典值必須是字串、數字或布林值類型。 |
value | 布林值|數字|字串,選填 | 要與單一鍵建立關聯的新值。如果第一個引數是字串,則必須提供這個引數,否則系統會忽略。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]