Street View Publish API 概览
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
简介
本文档适用于希望编写允许用户将 360 度全景照片上传到 Google 街景的应用,以便在 Google 地图上公开查看这些照片的开发者。
前期准备
-
您需要 Google 账号才能访问 Google API 控制台、请求 API 密钥以及注册应用。
-
在 Google Developers Console 中创建一个项目,并获取授权凭据,以便您的应用可以提交 API 请求。
-
创建项目后,请确保您的应用已注册使用 Street View Publish API:
- 转到 API 控制台,选择您刚刚注册的项目。
- 访问“已启用的 API”页面。确保 Google Street View API 位于已启用 API 列表中。否则,请打开 API 库并启用该 API。
-
如果您的应用所采用的 API 方法需要用户授权,则您可以参阅授权指南,了解如何采用 OAuth 2.0 授权。
-
熟悉 JavaScript 对象表示法 (JSON) 数据格式的核心概念。JSON 是一种独立于语言的通用开放标准,以“属性-值”对的形式提供简单易懂的数据文本表示形式。如需了解详情,请参阅 json.org。
-
请注意,您的照片需要包含全景照片 XMP 元数据中所述的元数据才能发布。
一分钟体验:APIs Explorer
要在不编写任何代码的情况下尝试使用 API 和了解 API 的用途,请访问 API Explorer。
即刻让您如愿以偿!
亲自尝试一下吧!
如需查看介绍如何上手使用的分步教程,请按照此指南中的说明操作。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\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)."]]