Max Zoom
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
google.maps.MaxZoomService
class
Usługa umożliwiająca uzyskanie najwyższego poziomu powiększenia, w którym dostępne są zdjęcia satelitarne danej lokalizacji.
Dostęp przez połączenie telefoniczne const {MaxZoomService} = await google.maps.importLibrary("maps")
. Zobacz Biblioteki w Maps JavaScript API.
Zespół |
MaxZoomService |
MaxZoomService()
Parametry: brak
Tworzy nową instancję MaxZoomService , której można używać do wysyłania zapytań o maksymalny poziom powiększenia dostępny dla zdjęć satelitarnych. |
Metody |
getMaxZoomAtLatLng |
getMaxZoomAtLatLng(latlng[, callback])
Zwraca maksymalny poziom powiększenia, dla którego dostępne są szczegółowe obrazy w danym LatLng dla typu mapy satellite . Ponieważ to żądanie jest asynchroniczne, musisz przekazać funkcję callback , która zostanie wykonana po zakończeniu żądania, przekazując MaxZoomResult . |
google.maps.MaxZoomResult
interfejs
Wynik MaxZoom w formacie JSON pobrany z MaxZoomService.
Właściwości |
zoom |
Typ: number
Maksymalny poziom powiększenia znaleziony dla danego LatLng . |
status optional |
Stan prośby. Ta właściwość jest zdefiniowana tylko wtedy, gdy używasz wywołań zwrotnych z użyciem MaxZoomService.getMaxZoomAtLatLng (nie jest zdefiniowana, gdy używasz obietnic). |
google.maps.MaxZoomStatus
stałe
Stan zwrócony przez MaxZoomService
po zakończeniu wywołania getMaxZoomAtLatLng()
. Określ je za pomocą wartości lub nazwy stałej. Na przykład 'OK'
lub google.maps.MaxZoomStatus.OK
.
Dostęp przez połączenie telefoniczne const {MaxZoomStatus} = await google.maps.importLibrary("maps")
. Zobacz Biblioteki w Maps JavaScript API.
Stałe |
ERROR |
Wystąpił nieznany błąd. |
OK |
Odpowiedź zawiera prawidłowy MaxZoomResult . |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-12-22 UTC.
[null,null,["Ostatnia aktualizacja: 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`. |"]]