Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Developer Wilayah Ekonomi Eropa (EEA)
Ubin peta jalan adalah ubin gambar berdasarkan data topografi vektor dengan gaya kartografi Google. Hal ini mencakup jalan, bangunan, lokasi menarik, dan batas politik.
Mendapatkan kartu peta jalan
Anda dapat mulai membuat permintaan kartu peta jalan setelah mendapatkan token sesi. Karena token sesi berlaku untuk seluruh sesi, Anda tidak perlu menentukan opsi peta dengan permintaan petak.
Contoh kode berikut menunjukkan permintaan token sesi umum untuk kartu peta jalan.
Dalam permintaan GET HTTPS ini, z adalah tingkat zoom
(berkisar dari 0 hingga 22), dan x serta
y adalah
koordinat petak
dari petak yang ingin Anda ambil.
Parameter orientation bersifat opsional. Nilainya menentukan jumlah
derajat rotasi berlawanan arah jarum jam pada gambar petak. orientation didukung untuk petak roadmap, dan juga didukung untuk permintaan satelit dan medan dengan citra dasar yang dihapus menggunakan "overlay": true, dan dengan layerTypes yang ditetapkan. Nilai orientation yang valid adalah 0 (default), 90, 180, dan
270.
Petak koordinat ubin tidak diputar jika Anda menyertakan nilai orientation. Misalnya, jika Anda menyetel orientation ke 90, koordinat
x masih menentukan posisi ubin dari kiri ke kanan, yang dalam hal ini adalah dari Utara ke Selatan di peta.
Orientasi nol derajat
Orientasi 90 derajat
Contoh permintaan kartu
Pertimbangkan contoh berikut, yang meminta satu petak yang berisi seluruh dunia. Dalam contoh ini, tingkat zoom adalah 0, dan koordinat x dan y adalah 0, 0.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)."]]