Max Zoom
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
google.maps.MaxZoomService
class
บริการสำหรับการซูมระดับสูงสุดที่มีภาพถ่ายจากดาวเทียมสำหรับสถานที่หนึ่งๆ
เข้าถึงโดยการโทรหา const {MaxZoomService} = await google.maps.importLibrary("maps")
โปรดดูไลบรารีใน Maps JavaScript API
ผู้ผลิต |
MaxZoomService |
MaxZoomService()
พารามิเตอร์: ไม่มี
สร้างอินสแตนซ์ใหม่ของ MaxZoomService ที่ใช้ส่งการค้นหาเกี่ยวกับระดับการซูมสูงสุดที่ใช้ได้กับภาพถ่ายดาวเทียม |
เมธอด |
getMaxZoomAtLatLng |
getMaxZoomAtLatLng(latlng[, callback])
แสดงผลระดับการซูมสูงสุดที่มีภาพรายละเอียดที่ LatLng ที่เฉพาะเจาะจงสำหรับแผนที่ประเภท satellite เนื่องจากคำขอนี้เป็นแบบไม่พร้อมกัน คุณต้องส่งผ่านฟังก์ชัน callback ซึ่งจะดำเนินการเมื่อคำขอเสร็จสมบูรณ์ โดยส่งผ่าน MaxZoomResult |
google.maps.MaxZoomResult
อินเทอร์เฟซ
ผลลัพธ์ MaxZoom ในรูปแบบ JSON ที่ดึงมาจาก MaxZoomService
พร็อพเพอร์ตี้ |
zoom |
ประเภท: number
ระดับการซูมสูงสุดที่พบใน LatLng ที่ระบุ |
status optional |
|
google.maps.MaxZoomStatus
constants
สถานะที่ MaxZoomService
ส่งคืนเมื่อการโทรไปยัง getMaxZoomAtLatLng()
เสร็จสมบูรณ์ ระบุค่าเหล่านี้ตามค่า หรือใช้ชื่อของค่าคงที่ เช่น 'OK'
หรือ google.maps.MaxZoomStatus.OK
เข้าถึงโดยการโทรหา const {MaxZoomStatus} = await google.maps.importLibrary("maps")
โปรดดูไลบรารีใน Maps JavaScript API
ค่าคงที่ |
ERROR |
เกิดข้อผิดพลาดที่ไม่รู้จัก |
OK |
การตอบกลับมี MaxZoomResult ที่ถูกต้อง |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 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`. |"]]