Max Zoom
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
google.maps . MaxZoomService
کلاس google.maps . MaxZoomService
سرویسی برای به دست آوردن بالاترین سطح زوم که در آن تصاویر ماهواره ای برای یک مکان مشخص در دسترس است.
با فراخوانی const {MaxZoomService} = await google.maps.importLibrary("maps")
دسترسی پیدا کنید. کتابخانه ها را در Maps JavaScript API ببینید.
سازنده |
---|
MaxZoomService | MaxZoomService() پارامترها: ندارد نمونه جدیدی از MaxZoomService ایجاد میکند که میتواند برای ارسال پرسشهایی درباره حداکثر سطح زوم موجود برای تصاویر ماهوارهای استفاده شود. |
مواد و روش ها |
---|
getMaxZoomAtLatLng | getMaxZoomAtLatLng(latlng[, callback]) حداکثر سطح بزرگنمایی را که تصاویر دقیق آن در LatLng خاص برای نوع نقشه satellite در دسترس است را برمی گرداند. از آنجایی که این درخواست ناهمزمان است، باید یک تابع callback ارسال کنید که پس از تکمیل درخواست اجرا میشود و یک MaxZoomResult ارسال میشود. |
google.maps . MaxZoomResult
رابط google.maps . MaxZoomResult
یک نتیجه MaxZoom با فرمت JSON که از MaxZoomService بازیابی شده است.
خواص |
---|
zoom | نوع: number حداکثر سطح بزرگنمایی یافت شده در LatLng داده شده. |
status optional | |
google.maps . MaxZoomStatus
ثابت های google.maps . MaxZoomStatus
وضعیتی که پس از تکمیل تماس با getMaxZoomAtLatLng()
توسط MaxZoomService
باز می گردد. اینها را با مقدار یا با استفاده از نام ثابت مشخص کنید. برای مثال، 'OK'
یا google.maps.MaxZoomStatus.OK
.
با فراخوانی const {MaxZoomStatus} = await google.maps.importLibrary("maps")
دسترسی پیدا کنید. کتابخانه ها را در Maps JavaScript API ببینید.
ثابت ها |
---|
ERROR | یک خطای ناشناخته رخ داد. |
OK | پاسخ حاوی یک MaxZoomResult معتبر است. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-12-22 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-12-22 بهوقت ساعت هماهنگ جهانی."],[],[],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`. |"]]