reviewsהשקת Places UI Kit: ספריית רכיבים מוכנה לשימוש בעלות נמוכה, שמאפשרת לכם להוסיף לכל מפה שתבחרו את ממשק המשתמש המוכר של 'מקומות' במפות Google. כדאי לנסות אותו ולשלוח לנו משוב כדי לעזור לנו לעצב את העתיד של GMP.
Max Zoom
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
google.maps.MaxZoomService
class
שירות שמאפשר לקבל את רמת הזום הגבוהה ביותר שבה צילומי לוויין זמינים למיקום נתון.
אפשר לגשת אליו באמצעות חיוג למספר const {MaxZoomService} = await google.maps.importLibrary("maps")
. ספריות ב-Maps JavaScript API
יצרן |
MaxZoomService |
MaxZoomService()
פרמטרים: ללא
יצירת מכונה חדשה של MaxZoomService שאפשר להשתמש בה כדי לשלוח שאילתות לגבי רמת הזום המקסימלית שזמינה לצילומי לוויין. |
Methods |
getMaxZoomAtLatLng |
getMaxZoomAtLatLng(latlng[, callback])
הפונקציה מחזירה את רמת הזום המקסימלית שבה זמינות תמונות מפורטות ב-LatLng מסוים לסוג המפה satellite . מכיוון שהבקשה הזו היא אסינכרונית, צריך להעביר פונקציית callback שתתבצע בסיום הבקשה, עם העברה של MaxZoomResult . |
ממשק google.maps.MaxZoomResult
תוצאה של MaxZoom בפורמט JSON שאוחזרה מ-MaxZoomService.
מאפיינים |
zoom |
סוג: number
רמת הזום המקסימלית שנמצאה ב-LatLng הנתון. |
status optional |
|
google.maps.MaxZoomStatus
קבועים
הסטטוס שהוחזר על ידי MaxZoomService
בסיום קריאה ל-getMaxZoomAtLatLng()
. אפשר לציין אותם לפי ערך או באמצעות שם הקבוע. לדוגמה, 'OK'
או google.maps.MaxZoomStatus.OK
.
אפשר לגשת אליו באמצעות חיוג למספר const {MaxZoomStatus} = await google.maps.importLibrary("maps")
. ספריות ב-Maps JavaScript API
קבועים |
ERROR |
הייתה שגיאה לא ידועה. |
OK |
התשובה מכילה MaxZoomResult תקין. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-12-22 (שעון UTC).
[null,null,["עדכון אחרון: 2024-12-22 (שעון UTC)."],[],[],null,["[MaxZoomService](#MaxZoomService)\nclass\n\n\ngoogle.maps`.`MaxZoomService\nclass\n\nA service for obtaining the highest zoom level at which satellite imagery is available for a given location.\n\nAccess by calling `const {MaxZoomService} = await google.maps.importLibrary(\"maps\")`. \nSee [Libraries in the Maps JavaScript API](/maps/documentation/javascript/libraries).\n\n| Constructor ||\n|-----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [MaxZoomService](#MaxZoomService.constructor) | `MaxZoomService()` **Parameters:** None Creates a new instance of a `MaxZoomService` that can be used to send queries about the maximum zoom level available for satellite imagery. |\n\n| Methods ||\n|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getMaxZoomAtLatLng](#MaxZoomService.getMaxZoomAtLatLng) | `getMaxZoomAtLatLng(latlng[, callback])` **Parameters:** - `latlng`: [LatLng](/maps/documentation/javascript/reference/coordinates#LatLng)`|`[LatLngLiteral](/maps/documentation/javascript/reference/coordinates#LatLngLiteral) - `callback`: `function(`[MaxZoomResult](/maps/documentation/javascript/reference/max-zoom#MaxZoomResult)`): void `optional **Return Value:** [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)`\u003c`[MaxZoomResult](/maps/documentation/javascript/reference/max-zoom#MaxZoomResult)`\u003e` Returns the maximum zoom level for which detailed imagery is available at a particular `LatLng` for the `satellite` map type. As this request is asynchronous, you must pass a `callback` function which will be executed upon completion of the request, being passed a `MaxZoomResult`. |\n\n[MaxZoomResult](#MaxZoomResult)\ninterface\n\n\ngoogle.maps`.`MaxZoomResult\ninterface\n\nA MaxZoom result in JSON format retrieved from the MaxZoomService.\n\n| Properties ||\n|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [zoom](#MaxZoomResult.zoom) | **Type:** `number` The maximum zoom level found at the given `LatLng`. |\n| [status](#MaxZoomResult.status)` `optional | **Type:** [MaxZoomStatus](/maps/documentation/javascript/reference/max-zoom#MaxZoomStatus)` `optional Status of the request. This property is only defined when using callbacks with [MaxZoomService.getMaxZoomAtLatLng](/maps/documentation/javascript/reference/max-zoom#MaxZoomService.getMaxZoomAtLatLng) (it is not defined when using Promises). |\n\n[MaxZoomStatus](#MaxZoomStatus)\nconstants\n\n\ngoogle.maps`.`MaxZoomStatus\nconstants\n\nThe status returned by the `MaxZoomService` on the completion of a call to `getMaxZoomAtLatLng()`. Specify these by value, or by using the constant's name. For example, `'OK'` or `google.maps.MaxZoomStatus.OK`.\n\nAccess by calling `const {MaxZoomStatus} = await google.maps.importLibrary(\"maps\")`. \nSee [Libraries in the Maps JavaScript API](/maps/documentation/javascript/libraries).\n\n| Constants ||\n|-------------------------------|------------------------------------------------|\n| [ERROR](#MaxZoomStatus.ERROR) | An unknown error occurred. |\n| [OK](#MaxZoomStatus.OK) | The response contains a valid `MaxZoomResult`. |"]]