ui.Map.GeometryLayer.set
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Đặt giá trị của một thuộc tính nhất định. Gây ra lỗi nếu đối tượng không hỗ trợ khoá được cung cấp. Xem các tham số của hàm khởi tạo để biết những thuộc tính nào có thể được đặt.
Trả về ui.data.ActiveDictionary này.
Cách sử dụng | Giá trị trả về |
---|
GeometryLayer.set(keyOrDict, value) | ui.data.ActiveDictionary |
Đối số | Loại | Thông tin chi tiết |
---|
this: ui.data.activedictionary | ui.data.ActiveDictionary | Đối tượng ui.data.ActiveDictionary. |
keyOrDict | Đối tượng|Chuỗi | Khoá của thuộc tính cần đặt hoặc từ điển gồm các cặp khoá/giá trị cần đặt trên đối tượng. |
value | Đối tượng, không bắt buộc | Giá trị mới của thuộc tính. Bạn phải làm việc này khi đối số đầu tiên là một chuỗi khoá. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eAllows modification of a GeometryLayer's properties by setting the value of a given property using a key or a dictionary of key/value pairs.\u003c/p\u003e\n"],["\u003cp\u003eThrows an error if the provided key is not a supported property, refer to the constructor's parameters for valid properties.\u003c/p\u003e\n"],["\u003cp\u003eReturns the ui.data.ActiveDictionary instance after the property modification.\u003c/p\u003e\n"],["\u003cp\u003eRequires a value argument when the first argument is a key string, indicating the new value for the specified property.\u003c/p\u003e\n"]]],[],null,["# ui.Map.GeometryLayer.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| GeometryLayer.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. |"]]