Usage of the SDK constitutes your agreement with the Matterport SDK Agreement. Email developers@matterport.com with any questions.
Type parameters
-
ItemT
The type of the items in the map.
Hierarchy
- IMapObserver
Index
Methods
Methods
Optional onAdded
-
Called when an item is added with the
index
, the newitem
, and current state of thecollection
.Parameters
-
index: string
-
item: ItemT
-
collection: Dictionary<ItemT>
Returns void
-
Optional onCollectionUpdated
-
Called when a set of changes happens within the
collection
. For example, this can be used to get the initial state of the collection instead of receiving individualonAdded
calls for each item.Parameters
-
collection: Dictionary<ItemT>
Returns void
-
Optional onRemoved
-
Called when an item is removed, with the
index
, the removeditem
, and current state of thecollection
.Parameters
-
index: string
-
item: ItemT
-
collection: Dictionary<ItemT>
Returns void
-
Optional onUpdated
-
Called when an existing item is altered, with the
index
, the newitem
, and current state of thecollection
.Parameters
-
index: string
-
item: ItemT
-
collection: Dictionary<ItemT>
Returns void
-
An observer that can subscribe to changes of an IObservableMap