Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Nhà phát triển ở Khu vực kinh tế Châu Âu (EEA)
Maps Static API cho phép bạn nhúng hình ảnh trên Google Maps vào trang web mà không cần JavaScript hoặc bất kỳ hoạt động tải trang động nào. Dịch vụ API Maps Static tạo bản đồ dựa trên các tham số URL được gửi thông qua yêu cầu HTTP chuẩn và trả về bản đồ dưới dạng hình ảnh mà bạn có thể hiển thị trên trang web.
Ví dụ nhanh
Ví dụ sau đây chứa URL của một hình ảnh API Maps Static về trung tâm thành phố New York, như hiển thị bên dưới:
Xin lưu ý rằng bạn không cần phải làm gì "đặc biệt" để hình ảnh này xuất hiện trên trang. Không cần JavaScript. Tất cả những gì chúng ta cần làm là tạo một URL và đặt URL đó trong thẻ <img>. Bạn có thể đặt API Google Maps tĩnh ở bất kỳ vị trí nào trên trang web mà bạn có thể đặt hình ảnh.
Xác thực, hạn mức, giá và chính sách
Xác thực
Để sử dụng API Maps Static, trước tiên, bạn phải bật API này và lấy thông tin xác thực thích hợp. Để biết thêm thông tin, hãy xem bài viết Bắt đầu sử dụng Google Maps Platform.
Hướng dẫn dành cho nhà phát triển API tĩnh của Maps dành cho những nhà phát triển trang web và nhà phát triển ứng dụng di động muốn đưa hình ảnh API tĩnh của Maps vào trang web hoặc ứng dụng di động. Tài liệu này cung cấp nội dung giới thiệu về cách sử dụng API và tài liệu tham khảo về các tham số có sẵn.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eThe Google Maps Static API allows you to embed Google Maps images on your webpage without JavaScript or dynamic loading by creating a URL with parameters and placing it within an \u003ccode\u003e<img>\u003c/code\u003e tag.\u003c/p\u003e\n"],["\u003cp\u003eTo use the API, you'll need a project with a billing account and the Maps Static API enabled, along with proper authentication credentials.\u003c/p\u003e\n"],["\u003cp\u003eThe Maps Static API creates map images based on URL parameters sent through an HTTP request, returning the map as a displayable image.\u003c/p\u003e\n"],["\u003cp\u003eUsage of the API is subject to quotas, pricing, and the Google Maps Platform Terms of Service, details of which can be found in the provided documentation links.\u003c/p\u003e\n"],["\u003cp\u003eStreet View imagery used in the API may come from both Google and public user-generated content, without an option to select a specific source.\u003c/p\u003e\n"]]],["The Maps Static API lets users embed Google Maps images on webpages via HTTP requests, without JavaScript. It requires a project with a billing account and API enablement. The API creates maps based on URL parameters and returns them as images. Users need to obtain authentication credentials. Usage is subject to quotas, pricing, and Google Maps Platform Terms of Service. The Street View imagery can come from Google or user-generated content, and users cannot control the source.\n"],null,["# Overview\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 Maps Static API will no longer be returned. [Learn more](/maps/comms/eea/maps-static).\n**Before you begin:** Before you start using the Maps Static API, you need a project with a billing account and the Maps Static API enabled. We recommend creating multiple Project Owners and Billing Administrators, so that you'll always have someone with these roles available to your team. To learn more, see [Set up in Cloud console](/maps/documentation/maps-static/cloud-setup). \n\nThe Maps Static API lets you embed a Google Maps image on your\nweb page without requiring JavaScript or any dynamic page loading. The\nMaps Static API service creates your map based on URL parameters sent\nthrough a standard HTTP request and returns the map as an image you can\ndisplay on your web page.\n| **Note:** Street View imagery [comes\n| from two sources](https://www.google.com/streetview/): Google (non-public developer-controlled imagery), and the public (UGC, or public user-generated content). Note that there is no way to use only one source of Street View imagery over the other. Learn more about our [Street view imagery privacy policy](https://www.google.com/streetview/privacy/).\n\nA quick example\n---------------\n\nThe following example contains the URL of a Maps Static API image of downtown\nNew York City, which is displayed below: \n\n```\nhttps://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap\n&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318\n&markers=color:red%7Clabel:C%7C40.718217,-73.998284\n&key=YOUR_API_KEY&signature=YOUR_SIGNATURE\n```\n\nNotice that you don't need to do anything \"special\" to get this image to\nshow up on the page. No JavaScript is required. All we needed to do was\ncreate a URL, and place it within an `\u003cimg\u003e` tag. You can\nplace a Google Maps Static API anywhere on your webpage where you can place an\nimage.\n\nAuthentication, quotas, pricing, and policies\n---------------------------------------------\n\n### Authentication\n\nTo use the Maps Static API, you must first enable the API and obtain the proper\nauthentication credentials. For more information, see\n[Get Started with Google Maps Platform](/maps/get-started).\n\n### Quotas and pricing\n\nReview the [usage and billing](/maps/documentation/maps-static/usage-and-billing)\npage for details on the quotas and pricing set for the Maps Static API.\n\n### Policies\n\nUse of the Maps Static API must be in accordance with the\n[Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms/).\n\nLearn more\n----------\n\nSee the [Maps Static API developers guide](/maps/documentation/maps-static/dev-guide) for more examples, parameter usage,\ntroubleshooting, and other details.\n\nThe [Maps Static API developers\nguide](/maps/documentation/maps-static/dev-guide) is intended for website and mobile developers who want to include Maps Static API\nimages within a webpage or mobile application. It provides an introduction to using the API and\nreference material on the available parameters."]]