Settings
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
google.maps.Settings
class
การตั้งค่าที่ควบคุมลักษณะการทํางานของ Maps JavaScript API โดยรวม
เข้าถึงโดยการโทรหา const {Settings} = await google.maps.importLibrary("core")
โปรดดูไลบรารีใน Maps JavaScript API
เมธอดแบบคงที่ |
getInstance |
getInstance()
พารามิเตอร์: ไม่มี
แสดงอินสแตนซ์แบบ Singleton ของ google.maps.Settings |
พร็อพเพอร์ตี้ |
experienceIds
|
ชุดรหัสประสบการณ์ที่ไม่ซ้ำกันซึ่งจะใช้ระบุแหล่งที่มาของการเรียก Maps JS API ค่าที่แสดงผลคือสําเนาของค่าภายในที่จัดเก็บไว้ในอินสแตนซ์แบบ Singleton ของคลาส Settings ดังนั้นการดำเนินการกับ google.maps.Settings.getInstance().experienceIds จะแก้ไขเฉพาะสำเนาเท่านั้น ไม่ใช่ค่าภายใน
หากต้องการอัปเดตค่าภายใน ให้ตั้งค่าพร็อพเพอร์ตี้ให้เท่ากับค่าใหม่ในอินสแตนซ์แบบ Singleton (เช่น google.maps.Settings.getInstance().experienceIds = [experienceId]; ) |
fetchAppCheckToken |
แสดงผลลัพธ์โทเค็น Firebase App Check โทเค็นจะแนบไปกับคำขอ gRPC เป็นส่วนหัว HTTP "X-Firebase-AppCheck" หากโทเค็นว่างเปล่า ระบบจะไม่แนบส่วนหัว |
google.maps.MapsAppCheckTokenResult
อินเทอร์เฟซ
อธิบายผลลัพธ์ของโทเค็น Firebase App Check
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-12-22 UTC
[null,null,["อัปเดตล่าสุด 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."]]