Settings
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.
Lớp google.maps.Settings
Các chế độ cài đặt kiểm soát toàn bộ hành vi của API Maps JavaScript.
Truy cập bằng cách gọi const {Settings} = await google.maps.importLibrary("core")
. Xem phần Thư viện trong API Maps JavaScript.
Phương thức tĩnh |
getInstance |
getInstance()
Thông số: Không có
Trả về thực thể singleton của google.maps.Settings . |
Thuộc tính |
experienceIds
|
Một tập hợp các mã trải nghiệm duy nhất để phân bổ các lệnh gọi API Maps JS. Giá trị được trả về là một bản sao của giá trị nội bộ được lưu trữ trong thực thể singleton của lớp Settings . Do đó, các thao tác trên google.maps.Settings.getInstance().experienceIds sẽ chỉ sửa đổi bản sao chứ không phải giá trị nội bộ.
Để cập nhật giá trị nội bộ, hãy đặt thuộc tính bằng giá trị mới trên thực thể singleton (ví dụ: google.maps.Settings.getInstance().experienceIds = [experienceId]; ). |
fetchAppCheckToken |
Trả về một lời hứa phân giải thành kết quả mã thông báo Firebase App Check. Mã thông báo được đính kèm vào các yêu cầu gRPC dưới dạng tiêu đề HTTP "X-Firebase-AppCheck". Nếu mã thông báo trống, thì tiêu đề sẽ không được đính kèm. |
Giao diện google.maps.MapsAppCheckTokenResult
Mô tả kết quả mã thông báo của tính năng Kiểm tra ứng dụng Firebase.
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: 2024-12-22 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-12-22 UTC."],[],[],null,["# Settings\n\nThe documentation for has moved to a different page.\n\nThe documentation for the linked item could not be found. \n\n[Settings](#Settings)\nclass\n---------------------------\n\n\ngoogle.maps`.`Settings\nclass\n\nSettings which control the behavior of the Maps JavaScript API as a whole.\n\nAccess by calling `const {Settings} = await google.maps.importLibrary(\"core\")`. \nSee [Libraries in the Maps JavaScript API](/maps/documentation/javascript/libraries).\n\n| ### Static Methods ||\n|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getInstance](#Settings.getInstance) | `getInstance()` **Parameters:** None **Return Value:** [Settings](/maps/documentation/javascript/reference/settings#Settings) Returns the singleton instance of `google.maps.Settings`. |\n\n| ### Properties ||\n|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [experienceIds](#Settings.experienceIds) | **Notice:** Available only in the [v=beta channel](/maps/documentation/javascript/versions#choosing-the-beta-channel). **Type:** [Iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)`\u003cstring\u003e` A collection of unique experience IDs to which to attribute Maps JS API calls. The returned value is a copy of the internal value that is stored in the `Settings` class singleton instance. Operations on `google.maps.Settings.getInstance().experienceIds` will therefore only modify the copy and not the internal value. To update the internal value, set the property equal to the new value on the singleton instance (ex: `google.maps.Settings.getInstance().experienceIds = [experienceId];`). |\n| [fetchAppCheckToken](#Settings.fetchAppCheckToken) | **Type:** `function(): `[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)`\u003c`[MapsAppCheckTokenResult](/maps/documentation/javascript/reference/settings#MapsAppCheckTokenResult)`\u003e` Set this property to a function that returns a promise which resolves to a Firebase App Check token result. |\n\n[MapsAppCheckTokenResult](#MapsAppCheckTokenResult)\ninterface\n-------------------------------------------------------------\n\n\ngoogle.maps`.`MapsAppCheckTokenResult\ninterface\n\nDescribes a Firebase App Check token result."]]