Managing cloud anchor without identifier

Anonymous
2021-12-16T01:01:56.22+00:00

im wonder about managing spatial anchors.

first, when i create new cloud anchor. what if i dont set cloudAnchor Expiration? is it remain in my spatila anchor account permanently?
now we using cosmos db for saving anchor's identifier. but, if for some reason (network issue or programmer mistake..) those identifier remove from db without removing actual spatial anchor in ASA account, how can i handle those anchors?
is there way to access to cloud anchor list on page or by script? or, all that i can do is just try hard to not make those situations?

Azure Spatial Anchors
Azure Spatial Anchors
An Azure service that is used to build immersive three-dimensional applications and experiences that map, persist, and restore content or points of interest at real-world scale.
88 questions
0 comments No comments
{count} votes

Accepted answer
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2021-12-16T10:48:03.653+00:00

    Hello @Anonymous ,

    If no expiration is set during anchor creation, the anchor will only expire when deleted manually.
    There are three ways to locate an anchor as specified in Locate a cloud spatial anchor

    You can use one strategy on a watcher at a time.:

    • Locate anchors by identifier.
    • Locate anchors connected to a previously located anchor.
    • Locate anchor using Coarse relocalization.

    I understand that, errors can happen and it is not ideal that we have missing\unknown anchors on our account. When saving an anchor to Cosmos DB I would recommend that you "protect" your scenario from these situations, for example do not save an anchor in ASA account if no confirmation is received from Cosmos DB and when deleting an anchor from Cosmos DB make use of the Change Feed to Trigger an Azure Function that will run a script to remove the anchor from ASA account as well.

    Thanks!

    Remember:

    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.