Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Sviluppatori dello Spazio economico europeo (SEE)
I riquadri della roadmap sono riquadri immagine basati su dati topografici vettoriali
con lo stile cartografico di Google. Sono inclusi strade, edifici, punti
d'interesse e confini politici.
Recupero delle schede della roadmap
Puoi iniziare a effettuare richieste di riquadri della roadmap dopo aver ricevuto un token di sessione. Poiché il
token di sessione si applica all'intera sessione, non devi specificare le opzioni della mappa
con le richieste di riquadro.
Il seguente esempio di codice mostra una tipica richiesta di token di sessione per
i riquadri della roadmap.
In questa richiesta GET HTTPS, z è il livello di zoom
(compreso tra 0 e 22), mentre x e
y sono le
coordinate del riquadro
del riquadro che vuoi recuperare.
Il parametro orientation è facoltativo. Il suo valore specifica il numero di
gradi di rotazione in senso antiorario dell'immagine del riquadro. orientation è
supportato per i riquadri roadmap ed è supportato anche per le richieste satellitari e
del terreno con le immagini di base rimosse utilizzando "overlay": true e con
layerTypes impostato. I valori validi di orientation sono 0 (il valore predefinito), 90, 180 e
270.
La griglia delle coordinate del riquadro non viene ruotata se includi un valore orientation. Ad esempio, se imposti orientation su 90, la coordinata x definisce comunque la posizione della tessera da sinistra a destra, che in questo caso va da nord a sud sulla mappa.
Orientamento a zero gradi
Orientamento a 90 gradi
Esempio di richiesta di riquadro
Considera l'esempio seguente, che richiede un singolo riquadro contenente
il mondo intero. In questo esempio, il livello di zoom è 0 e le coordinate x e y sono
0, 0.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eRoadmap tiles provide vector-based topographic data including roads, buildings, points of interest, and political boundaries, styled with Google's cartography.\u003c/p\u003e\n"],["\u003cp\u003eTo get roadmap tiles, you need a session token obtained through an HTTPS POST request with map type, language, and region specified.\u003c/p\u003e\n"],["\u003cp\u003eIndividual tiles are retrieved using an HTTPS GET request, providing the zoom level (z), tile coordinates (x, y), session token, and optionally, orientation.\u003c/p\u003e\n"],["\u003cp\u003eTile coordinates differ from geographic coordinates and range from zoom level 0 (entire world) to 22 (highly detailed).\u003c/p\u003e\n"],["\u003cp\u003eThe optional \u003ccode\u003eorientation\u003c/code\u003e parameter rotates the tile image counter-clockwise by 0, 90, 180, or 270 degrees without affecting the tile coordinate grid.\u003c/p\u003e\n"]]],["Roadmap tiles, based on vector topographic data with Google's styling, are accessed via HTTPS requests. First, obtain a session token using a POST request specifying `roadmap`, `language`, and `region`. Then, make GET requests with the session token, API key, zoom level (`z`), and tile coordinates (`x`, `y`) to retrieve tiles. The optional `orientation` parameter rotates the tile (0, 90, 180, 270 degrees). Tiles are downloaded directly to a local file without a server response message.\n"],null,["# Roadmap tiles\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google\n| Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. [Learn more](/maps/comms/eea/faq). In addition, certain content from the Map Tiles API will no longer be returned. [Learn more](/maps/comms/eea/map-tiles).\n\nRoadmap tiles are image tiles based on vector topographic data\nwith Google's cartographic styling. This includes roads, buildings, points\nof interest, and political boundaries.\n\nGetting roadmap tiles\n---------------------\n\nYou can begin making roadmap tile requests after you get a session token. Because the\nsession token applies to the entire session, you don't have to specify the map\noptions with your tile requests.\n\nThe following code sample demonstrates a typical session token request for\nroadmap tiles. \n\n```json\ncurl -X POST -d '{\n \"mapType\": \"roadmap\",\n \"language\": \"en-US\",\n \"region\": \"US\"\n}' \\\n-H 'Content-Type: application/json' \\\n\"https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY\"\n```\n\nYou get roadmap tiles by making an HTTPS GET request, as shown in the following\nexample. \n\n```json\ncurl \"https://tile.googleapis.com/v1/2dtiles/\u003cvar class=\"apiparam\" translate=\"no\"\u003ez\u003c/var\u003e/\u003cvar class=\"apiparam\" translate=\"no\"\u003ex\u003c/var\u003e/\u003cvar class=\"apiparam\" translate=\"no\"\u003ey\u003c/var\u003e?session=\u003cvar class=\"apiparam\" translate=\"no\"\u003eYOUR_SESSION_TOKEN\u003c/var\u003e&key=YOUR_API_KEY&orientation=\u003cvar class=\"apiparam\" translate=\"no\"\u003e0_or_90_or_180_or_270\u003c/var\u003e\"\n```\n\nIn this HTTPS GET request, \u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ez\u003c/code\u003e\u003c/var\u003e is the zoom level\n(ranging from 0 to 22), and \u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ex\u003c/code\u003e\u003c/var\u003e and\n\u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ey\u003c/code\u003e\u003c/var\u003e are the\n[tile coordinates](/maps/documentation/javascript/coordinates#tile-coordinates)\nof the tile you want to retrieve.\n| **Note:** Tile coordinates are not the same as geographic coordinates. For more information about tile coordinates, see [Map and tile coordinates](/maps/documentation/javascript/coordinates) in the Maps JavaScript API documentation.\n\nThe `orientation` parameter is optional. Its value specifies the number of\ndegrees of counter-clockwise rotation of the tile image. `orientation` is\nsupported for `roadmap` tiles, and it's also supported for satellite and\nterrain requests with base imagery removed using `\"overlay\": true`, and with\n`layerTypes` set. Valid `orientation` values are 0 (the default), 90, 180, and\n270.\n\nThe tile coordinate grid isn't rotated if you include an `orientation`\nvalue. For example, if you set `orientation` to 90, then the\n\u003cvar class=\"apiparam\" translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ex\u003c/code\u003e\u003c/var\u003e coordinate still defines the left-to-right\nposition of the tile, which in this case is from North to South on the map.\n\n| Zero-degrees orientation | 90-degrees orientation |\n|--------------------------|------------------------|\n| | |\n\nExample tile request\n--------------------\n\nConsider the following example, which requests a single tile that contains the\nentire world. In this example, zoom level is 0, and the x and y coordinates are\n0, 0. \n\n```json\ncurl \"https://tile.googleapis.com/v1/2dtiles/0/0/0?session=\u003cvar class=\"apiparam\" translate=\"no\"\u003eYOUR_SESSION_TOKEN\u003c/var\u003e&key=YOUR_API_KEY\" --output /tmp/example_tile.png\n```\n\nThere is no response message from the server in this example. Instead, the tile\ndownloads to a local file, with the following statistics.\n\n```bash\n % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n100 8335 100 8335 0 0 51471 0 --:--:-- --:--:-- --:--:-- 54835\n```\n\nFor information about response message headers, see\n[Pre-Fetching, Caching, or Storage of Content](/maps/documentation/tile/policies#pre-fetching,-caching,-or-storage-of-content)."]]