Stay organized with collections
Save and categorize content based on your preferences.
GARCreateAnchorOnTerrainFuture
A handle to an async operation initiated by a call to createAnchorWithCoordinate:altitudeAboveTerrain:eastUpSouthQAnchor:completionHandler:error: (GARSession(Geospatial))
.
See the Terrain anchors developer guide for more information.
Summary
Inheritance
Inherits from:
GARFuture
Properties
|
resultAnchor
|
The result anchor of the async operation, or nil if the operation isn't completed successfully.
|
resultTerrainAnchorState
|
The result terrain anchor state of the async operation, or a default value if the operation isn't complete.
|
Properties
resultAnchor
The result anchor of the async operation, or nil if the operation isn't completed successfully.
This should only be used after checking that state
is GARFutureStateDone
.
resultTerrainAnchorState
The result terrain anchor state of the async operation, or a default value if the operation isn't complete.
This should only be used after checking that state
is GARFutureStateDone
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-14 UTC.
[null,null,["Last updated 2025-07-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eGARCreateAnchorOnTerrainFuture\u003c/code\u003e handles the asynchronous operation of creating terrain anchors in Google's ARCore Geospatial API.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties like \u003ccode\u003eresultAnchor\u003c/code\u003e and \u003ccode\u003eresultTerrainAnchorState\u003c/code\u003e to access the outcome of the anchor creation process.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should consult the Terrain anchors developer guide and the \u003ccode\u003eGARSession\u003c/code\u003e documentation for detailed usage instructions.\u003c/p\u003e\n"],["\u003cp\u003eBefore accessing result properties, ensure the operation's state is \u003ccode\u003eGARFutureStateDone\u003c/code\u003e using the \u003ccode\u003estate\u003c/code\u003e property inherited from \u003ccode\u003eGARFuture\u003c/code\u003e.\u003c/p\u003e\n"]]],["`GARCreateAnchorOnTerrainFuture` represents an asynchronous operation for creating terrain anchors. It provides two key properties: `resultAnchor`, which holds the resulting `GARAnchor` if the operation succeeds (otherwise nil), and `resultTerrainAnchorState`, detailing the operation's terrain anchor state. Both properties are only valid after confirming the operation's `state` is `GARFutureStateDone`. This future is created with a call to `createAnchorWithCoordinate`.\n"],null,["# GARCreateAnchorOnTerrainFuture Class Reference\n\nGARCreateAnchorOnTerrainFuture\n==============================\n\nA handle to an async operation initiated by a call to [createAnchorWithCoordinate:altitudeAboveTerrain:eastUpSouthQAnchor:completionHandler:error: (GARSession(Geospatial))](/ar/reference/ios/category/GARSession(Geospatial)#createanchorwithcoordinate:altitudeaboveterrain:eastupsouthqanchor:completionhandler:error:).\n\nSee the [Terrain anchors developer guide](https://developers.google.com/ar/develop/ios/geospatial/anchors#terrain-anchors) for more information.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: [`GARFuture`](/ar/reference/ios/interface/GARFuture)\n\n| ### Properties ||\n|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [resultAnchor](#resultanchor) | [GARAnchor](/ar/reference/ios/interface/GARAnchor#interface_g_a_r_anchor)` *` The result anchor of the async operation, or nil if the operation isn't completed successfully. |\n| [resultTerrainAnchorState](#resultterrainanchorstate) | [GARTerrainAnchorState](/ar/reference/ios/group/GARTerrainAnchorState#garterrainanchorstate) The result terrain anchor state of the async operation, or a default value if the operation isn't complete. |\n\nProperties\n----------\n\n### resultAnchor\n\n```transact-sql\n@property(nonatomic, nullable, readonly) /ar/reference/ios/interface/GARAnchor#interface_g_a_r_anchor */ar/reference/ios/interface/GARCreateAnchorOnTerrainFuture#resultanchor;\n``` \nThe result anchor of the async operation, or nil if the operation isn't completed successfully.\n\nThis should only be used after checking that [state](/ar/reference/ios/interface/GARFuture#state) is [GARFutureStateDone](/ar/reference/ios/group/GARFutureState#garfuturestatedone). \n\n### resultTerrainAnchorState\n\n```transact-sql\n@property(nonatomic, readonly) /ar/reference/ios/group/GARTerrainAnchorState#garterrainanchorstate /ar/reference/ios/interface/GARCreateAnchorOnTerrainFuture#resultterrainanchorstate;\n``` \nThe result terrain anchor state of the async operation, or a default value if the operation isn't complete.\n\nThis should only be used after checking that [state](/ar/reference/ios/interface/GARFuture#state) is [GARFutureStateDone](/ar/reference/ios/group/GARFutureState#garfuturestatedone)."]]