Max Zoom
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
google.maps.MaxZoomService
Kurs
Ein Dienst zum Abruf der höchsten Zoomstufe eines bestimmten Standorts, für die Satellitenbilder erhältlich sind.
Rufe const {MaxZoomService} = await google.maps.importLibrary("maps")
auf, um auf die Daten zuzugreifen. Weitere Informationen finden Sie unter Bibliotheken in der Maps JavaScript API.
Konstruktor |
MaxZoomService |
MaxZoomService()
Parameter:Keine
Erstellt eine neue Instanz von MaxZoomService , mit der Abfragen zur maximalen Zoomstufe für Satellitenbilder gesendet werden können. |
Methoden |
getMaxZoomAtLatLng |
getMaxZoomAtLatLng(latlng[, callback])
Gibt die maximale Zoomstufe zurück, für die detaillierte Bilder für den Kartentyp satellite an einer bestimmten LatLng verfügbar sind. Da diese Anfrage asynchron ist, müssen Sie eine callback -Funktion übergeben, die nach Abschluss der Anfrage ausgeführt wird und einen MaxZoomResult übergeben bekommt. |
google.maps.MaxZoomResult
Benutzeroberfläche
Ein MaxZoom-Ergebnis im JSON-Format, das vom MaxZoomService abgerufen wird.
Attribute |
zoom |
Typ:number
Die maximale Zoomstufe, die bei der angegebenen LatLng gefunden wurde. |
status optional |
|
google.maps.MaxZoomStatus
constants
Der Status, der von der MaxZoomService
nach Abschluss eines Aufrufs von getMaxZoomAtLatLng()
zurückgegeben wird. Geben Sie diese Werte anhand des Werts oder des Namens der Konstante an. Beispiel: 'OK'
oder google.maps.MaxZoomStatus.OK
.
Rufe const {MaxZoomStatus} = await google.maps.importLibrary("maps")
auf, um auf die Daten zuzugreifen. Weitere Informationen finden Sie unter Bibliotheken in der Maps JavaScript API.
Konstanten |
ERROR |
Ein unbekannter Fehler ist aufgetreten. |
OK |
Die Antwort enthält ein gültiges MaxZoomResult . |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-12-22 (UTC).
[null,null,["Zuletzt aktualisiert: 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`. |"]]