reviewsהשקת Places UI Kit: ספריית רכיבים מוכנה לשימוש בעלות נמוכה, שמאפשרת לכם להוסיף לכל מפה שתבחרו את ממשק המשתמש המוכר של 'מקומות' במפות Google. כדאי לנסות אותו ולשלוח לנו משוב כדי לעזור לנו לעצב את העתיד של GMP.
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 ישנו רק את העותק ולא את הערך הפנימי.
כדי לעדכן את הערך הפנימי, מגדירים את המאפיין כערך החדש במכונה היחידה (למשל: google.maps.Settings.getInstance().experienceIds = [experienceId]; ). |
fetchAppCheckToken |
הפונקציה מחזירה הבטחה (promise) שמתקבלת ממנה תוצאה של אסימון של בדיקת האפליקציה ב-Firebase. האסימון מצורף לבקשות gRPC ככותרת HTTP מסוג X-Firebase-AppCheck. אם הטוקן ריק, הכותרת לא מצורפת. |
ממשק google.maps.MapsAppCheckTokenResult
תיאור של תוצאת אסימון של Firebase App Check.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 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."]]