借助 ARCore Geospatial API,您可以远程将内容附加到 Google 街景覆盖的任何区域,并在全球范围内打造 AR 体验。该 API 使用设备传感器和 GPS 数据来检测设备的环境,然后将该环境中可识别的部分与 Google 视觉定位系统 (VPS) 提供的定位模型进行匹配,以确定用户设备的确切位置。该 API 还会负责将用户的本地坐标与 VPS 中的地理坐标合并,以便您在单个坐标系中工作。
使用 VPS 实现全球本地化
VPS 的基础是 Google 地图中超过 15 年来在全球各地拍摄的街景图片。深度神经网络会识别和描述图像中可能在很长一段时间内可识别的部分。然后,系统会将这些部分跨数百亿张图片组合起来,以计算全球环境的 3D 点云。此本地化模型包含数万亿个数据点,涵盖几乎所有国家/地区,未来还会扩大覆盖范围。
当用户的设备向 Geospatial API 发出请求时,神经网络会处理像素,以查找用户环境中可识别的部分,并将其与 VPS 定位模型进行匹配。然后,计算机视觉算法会计算设备的位置和方向,提供的位置信息比之前仅使用 GPS 时提供的位置信息要准确得多。
使用 Geospatial API 放置锚点
放置锚点时,其他 ARCore API(例如 ARCore Cloud Anchor API)也会使用图片地图来确定设备的姿势。不过,这些 API 创建的图片地图是本地的,因为它们需要明确映射一个空间。
Geospatial API 可根据 WGS84 规范提供锚点的水平(纬度和经度)和垂直(海拔)位置。您可以在世界几乎任何地点的给定纬度、经度和海拔处放置地理空间锚点,而无需手动绘制空间。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe ARCore Geospatial API lets you build globally-scaled AR experiences by anchoring content to locations covered by Google Street View.\u003c/p\u003e\n"],["\u003cp\u003eIt uses Google's Visual Positioning System (VPS) and device sensor data for precise localization, surpassing GPS accuracy.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create location-based AR experiences, games, and utilities without needing to map spaces manually.\u003c/p\u003e\n"],["\u003cp\u003eGeospatial Anchors provide latitude, longitude, and altitude positioning, allowing content placement almost anywhere in the world.\u003c/p\u003e\n"],["\u003cp\u003eThe API is supported on most ARCore-enabled devices, with exceptions listed on the ARCore supported devices page.\u003c/p\u003e\n"]]],["The ARCore Geospatial API enables attaching AR content to real-world locations using Google's Visual Positioning System (VPS). It leverages Street View images and neural networks to determine a device's precise location, merging local and geographic coordinates. Users can utilize WGS84, terrain, or rooftop anchors to place content. Key actions include creating global AR experiences, guiding users to locations, and enabling creative projects. The API offers high accuracy and reliability, unlike GPS alone. Open-source projects like Balloon Pop and Pocket Garden showcase its capabilities.\n"],null,["# Build global-scale, immersive, location-based AR experiences with the ARCore Geospatial API\n\n**Platform-specific guides** \n\n### Android (Kotlin/Java)\n\n- [Quickstart](/ar/develop/java/geospatial/quickstart)\n- [Developer guide](/ar/develop/java/geospatial/developer-guide)\n- [Geospatial codelab](/ar/develop/java/geospatial/codelab)\n\n### Android NDK (C)\n\n- [Developer guide](/ar/develop/c/geospatial/developer-guide)\n\n### Unity (AR Foundation)\n\n- [Android developer guide](/ar/develop/unity-arf/geospatial/developer-guide-android)\n- [iOS developer guide](/ar/develop/unity-arf/geospatial/developer-guide-ios)\n\n### iOS\n\n- [Quickstart](/ar/develop/ios/geospatial/quickstart)\n- [Developer guide](/ar/develop/ios/geospatial/developer-guide)\n\n### Unreal Engine\n\n- [ARCore SDK for Unreal Engine (official documentation)](https://docs.unrealengine.com/5.0/en-US/developing-for-arcore-in-unreal-engine/)\nYour browser does not support the video tag.\n\nThe **ARCore Geospatial API** enables you to remotely attach content to any area covered by Google [Street View](https://www.google.com/streetview/) and create AR experiences on a global scale. It uses device sensor and GPS data to detect the device's environment, then matches the recognizable parts of that environment to a localization model provided by Google's Visual Positioning System (VPS) to determine the precise location of a user's device. The API also takes care of merging the user's local coordinates with the geographic coordinates from VPS so that you can work within a single coordinate system.\n\nGlobal localization with VPS\n----------------------------\n\nStreet View images from Google Maps, which have been captured around the globe for more than 15 years, are the foundation of VPS. Deep neural networks identify and describe parts of the images that are likely to be recognizable over long periods of time. Those parts are then combined across tens of billions of images to compute a 3D point cloud of the global environment. This localization model consists of trillions of points and spans nearly all countries, with future coverage.\n\nWhen the user's device makes a request to the Geospatial API, a neural network processes the pixels to find recognizable parts of the user's environment and matches them to the VPS localization model. Computer vision algorithms then compute the position and orientation of the device, offering a location that is much more accurate than what was previously possible with GPS alone.\nYour browser does not support the video tag.\n\nPlacing anchors with the Geospatial API\n---------------------------------------\n\nWhen placing [anchors](/ar/develop/anchors), other ARCore APIs such as the [ARCore Cloud Anchor API](/ar/develop/cloud-anchors) also use image maps to determine a device's pose. However, the image maps created by these APIs are local because they explicitly need to map a space.\n\nThe Geospatial API provides for an anchor's horizontal (latitude and longitude) and vertical (altitude) positions following the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) specification. You can place a Geospatial anchor almost anywhere in the world at a given latitude, longitude and altitude without needing to manually map the space.\n\nTypes of Geospatial Anchors\n---------------------------\n\nThere are three types of Geospatial Anchors which can be used to attach content to\na real-world locations. WGS84 anchors represent a location at a given latitude, longitude, and altitude relative to the WGS84 ellipsoid.\nTerrain anchors represent a location at a given latitude, longitude, and an elevation relative to the ground or floor.\nRooftop anchors represent a location at a given altitude, longitude, and an elevation relative to the top of a building.\nRead more about them in the [developer guides](#guides).\n\nUse cases for developing with the Geospatial API\n------------------------------------------------\n\nHere are some ways you can use the Geospatial API in your own projects.\n\n### Guide users to specific locations\n\nGPS is great for building location-based experiences, but the accuracy can be off when you need to build AR experiences that are exact and precise. With the Geospatial API, you won't have to worry about your virtual objects jumping around. You can explicitly map place of interest to attach content to it and reliably localize against it, enabling users to find their cars in dense urban areas, or find their way around busy spaces.\n\n### Create location-based AR experiences\n\nYou can create compelling user experiences with the Geospatial API that provide utility and delight without needing to build and maintain maps of multiple locations. Immerse your users in a virtual world where anything is possible.\n\n### Gaming and self-expression\n\nWith the Geospatial API, your users can turn the globe into a canvas for creativity. For example, [Balloon Pop](https://github.com/googlecreativelab/balloon-pop) lets a user place balloons as targets in the real world and try to pop them using a physics-enabled ball that reacts to distance in world space. Nearby users can join the experience and pop the same balloons via a simple Firebase implementation. With [Pocket Garden](https://github.com/buck-co/PocketGarden), a user can adorn their neighborhood with a colorful AR community garden, accurately placing seeds across the real world at scale, planting vines, puffy succulents, and more. Both Balloon Pop and Pocket Garden are open sourced and available to you for bootstrapping your own creativity.\n\nDevice compatibility\n--------------------\n\nA small number of ARCore supported devices do not support the Geospatial API. These devices are indicated on the [ARCore supported devices page](/ar/devices).\n\nWhat's next\n-----------\n\n- Watch [an I/O talk on VPS and the ARCore Geospatial API](https://www.youtube.com/watch?v=pFn11hYZM2E&feature=emb_title) that showcases the Geospatial API and its capabilities in greater detail.\n- Explore [Balloon Pop](https://github.com/googlecreativelab/balloon-pop) and [Pocket Garden](https://github.com/buck-co/PocketGarden), two open-source sample apps that utilize the Geospatial API."]]