Max Zoom
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
google.maps.MaxZoomService
corso
Un servizio per ottenere il livello di zoom più alto a cui sono disponibili le immagini satellitari per una determinata località.
Accedi chiamando const {MaxZoomService} = await google.maps.importLibrary("maps")
. Consulta la sezione Librerie nell'API Maps JavaScript.
Costruttore |
MaxZoomService |
MaxZoomService()
Parametri: nessuno
Crea una nuova istanza di un MaxZoomService che può essere utilizzata per inviare query sul livello di zoom massimo disponibile per le immagini satellitari. |
Metodi |
getMaxZoomAtLatLng |
getMaxZoomAtLatLng(latlng[, callback])
Restituisce il livello di zoom massimo per cui sono disponibili immagini dettagliate in un determinato LatLng per il tipo di mappa satellite . Poiché questa richiesta è asincrona, devi passare una funzione callback che verrà eseguita al termine della richiesta, passando un MaxZoomResult . |
google.maps.MaxZoomResult
interfaccia
Un risultato MaxZoom in formato JSON recuperato dal servizio MaxZoomService.
Proprietà |
zoom |
Tipo: number
Il livello di zoom massimo trovato al valore LatLng specificato. |
status optional |
Stato della richiesta. Questa proprietà viene definita solo quando si utilizzano i callback con MaxZoomService.getMaxZoomAtLatLng (non è definita quando si utilizzano le promesse). |
google.maps.MaxZoomStatus
costanti
Lo stato restituito da MaxZoomService
al termine di una chiamata a getMaxZoomAtLatLng()
. Specificali in base al valore o utilizzando il nome della costante. Ad esempio, 'OK'
o google.maps.MaxZoomStatus.OK
.
Accedi chiamando const {MaxZoomStatus} = await google.maps.importLibrary("maps")
. Consulta la sezione Librerie nell'API Maps JavaScript.
Costanti |
ERROR |
Si è verificato un errore sconosciuto. |
OK |
La risposta contiene un MaxZoomResult valido. |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-12-22 UTC.
[null,null,["Ultimo aggiornamento 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`. |"]]