Tổng quan về API Xuất bản Chế độ xem đường phố
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.
Giới thiệu
Tài liệu này dành cho các nhà phát triển muốn viết ứng dụng cho phép người dùng tải ảnh 360 độ lên Chế độ xem đường phố của Google để mọi người có thể xem công khai trên Google Maps.
Trước khi bắt đầu
-
Bạn cần có một Tài khoản Google để truy cập vào Google API Console, yêu cầu khoá API và đăng ký ứng dụng.
-
Tạo một dự án trong Google Developers Console rồi lấy thông tin đăng nhập cấp phép để ứng dụng của bạn có thể gửi yêu cầu API.
-
Sau khi tạo dự án, hãy đảm bảo rằng API Xuất bản Chế độ xem đường phố là một trong những dịch vụ mà ứng dụng của bạn đã đăng ký sử dụng:
- Chuyển đến API Console rồi chọn dự án mà bạn vừa đăng ký.
- Truy cập vào trang API đã bật. Đảm bảo rằng API Chế độ xem đường phố của Google có trong danh sách API đã bật. Nếu không, hãy mở Thư viện API rồi bật API.
-
Nếu ứng dụng của bạn sử dụng bất kỳ phương thức API nào yêu cầu có xác thực của người dùng, hãy đọc hướng dẫn xác thực để biết cách thực hiện xác thực OAuth 2.0.
-
Làm quen với các khái niệm cốt lõi của định dạng dữ liệu JavaScript Object Notation (JSON). JSON là một tiêu chuẩn mở phổ biến, độc lập về ngôn ngữ, cung cấp phần trình bày văn bản đơn giản, dễ đọc của dữ liệu (dưới dạng cặp thuộc tính–giá trị). Để biết thêm thông tin, hãy xem json.org.
-
Hãy nhớ rằng ảnh của bạn cần có siêu dữ liệu được mô tả trong phần Siêu dữ liệu XMP của Ảnh toàn cảnh 360 độ để có thể xuất bản.
Trải nghiệm một phút: Trình khám phá API
Để tìm hiểu và xem những việc API có thể làm mà không cần viết mã, hãy truy cập Trình khám phá API.
Thỏa mãn tức thì!
Hãy tự mình trải nghiệm!
Để xem hướng dẫn từng bước giải thích cách thiết lập và chạy, hãy làm theo hướng dẫn trong hướng dẫn này.
Tài liệu tham khảo
Để tra cứu một loại tài nguyên hoặc phương thức cụ thể, hãy xem phần Tài liệu tham khảo.
Thư viện ứng dụng
Kiểm tra thư viện ứng dụng có sẵn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eThis documentation guides developers on how to build applications enabling users to upload 360° photos to Google Street View for public viewing on Google Maps.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need a Google Account, a project in the Google Developers Console with the Street View Publish API enabled, and potentially OAuth 2.0 authorization for user-specific actions.\u003c/p\u003e\n"],["\u003cp\u003ePhotos must contain specific metadata outlined in the Photo Sphere XMP Metadata documentation to be successfully published.\u003c/p\u003e\n"],["\u003cp\u003eThe API can be explored without coding through the provided APIs Explorer for immediate experimentation.\u003c/p\u003e\n"],["\u003cp\u003eA step-by-step tutorial and comprehensive reference materials are available for developers to quickly get started and delve deeper into specific functionalities.\u003c/p\u003e\n"]]],["Developers creating apps for uploading 360 photos to Google Street View must first create a Google Account and a project in the Google Developers Console to get authorization credentials. They need to enable the Street View Publish API in their project and, if needed, implement OAuth 2.0 for user authorization. Understanding JSON data format and adding Photo Sphere XMP Metadata to photos is crucial. Developers can experiment using the APIs Explorer or follow a tutorial guide.\n"],null,["# Street View Publish API Overview\n\nIntroduction\n------------\n\nThis document is intended for developers who want to write applications that allow users to upload 360 photos to Google Street View, so that they can be viewed publicly on Google Maps.\n\n### Before you start\n\n1. You need a [Google Account](https://www.google.com/accounts/NewAccount) to access the Google API Console, request an API key, and register your application.\n\n2. Create a project in the [Google Developers Console](https://console.developers.google.com) and obtain [authorization credentials](https://console.developers.google.com/apis/credentials) so your application can submit API requests.\n\n3. After creating your project, make sure the Street View Publish API is one of the services that your application is registered to use:\n\n \u003cbr /\u003e\n\n 1. Go to the [API Console](https://console.cloud.google.com/) and select the project that you just registered.\n 2. Visit the [Enabled APIs page](https://console.cloud.google.com/apis/enabled). Make sure that the Google Street View API is on the list of enabled APIs. If it isn't, then [open the API Library](https://console.cloud.google.com/apis/library) and enable the API.\n\n \u003cbr /\u003e\n\n4. If your application will use any API methods that require user authorization, read the [authentication](/streetview/publish/authorizing) guide to learn how to implement OAuth 2.0 authorization.\n\n5. Familiarize yourself with the core concepts of the JavaScript Object Notation (JSON) data format. JSON is a common, language-independent open standard that provides a simple, human-readable text representation of data (as attribute--value pairs). For more information, see [json.org](http://json.org).\n\n6. Remember your photos need the metadata described in [Photo Sphere XMP Metadata](/streetview/spherical-metadata) in order to be published.\n\nThe one-minute experience: APIs Explorer\n----------------------------------------\n\nTo play around and see what the API can do, without writing any code, visit\nthe [APIs Explorer](https://developers.google.com/apis-explorer/#p/streetviewpublish/v1/).\nInstant gratification!\n\nTry it yourself!\n----------------\n\nFor a step-by-step tutorial explaining how to get up and running, follow the instructions in [this guide](/streetview/publish/first-app).\n\nReference\n---------\n\nTo look up a particular resource type or method, see the [Reference](/streetview/publish/reference/rest).\n\nClient libraries\n----------------\n\nCheck out the available client [libraries](/streetview/publish/libraries)."]]