Page Summary
-
Roadmap tiles provide vector-based topographic data including roads, buildings, points of interest, and political boundaries, styled with Google's cartography.
-
To get roadmap tiles, you need a session token obtained through an HTTPS POST request with map type, language, and region specified.
-
Individual tiles are retrieved using an HTTPS GET request, providing the zoom level (z), tile coordinates (x, y), session token, and optionally, orientation.
-
Tile coordinates differ from geographic coordinates and range from zoom level 0 (entire world) to 22 (highly detailed).
-
The optional
orientationparameter rotates the tile image counter-clockwise by 0, 90, 180, or 270 degrees without affecting the tile coordinate grid.
Roadmap tiles are image tiles based on vector topographic data
with Google’s cartographic styling. This includes roads, buildings, points
of interest, and political boundaries.
Getting roadmap tiles
You can begin making roadmap tile requests after you get a session token. Because the session token applies to the entire session, you don't have to specify the map options with your tile requests.
The following code sample demonstrates a typical session token request for roadmap tiles.
curl -X POST -d '{ "mapType": "roadmap", "language": "en-US", "region": "US" }' \ -H 'Content-Type: application/json' \ "https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY"
You get roadmap tiles by making an HTTPS GET request, as shown in the following example.
curl "https://tile.googleapis.com/v1/2dtiles/z/x/y?session=YOUR_SESSION_TOKEN