Settings | Matterport SDK
Usage of the SDK constitutes your agreement with the Matterport SDK Agreement. Email developers@matterport.com with any questions.

Index

Methods

Methods

get

  • get(key: string): Promise<any | undefined>
  • This function returns the value of a setting if it exists, if it does not currently exist, it will return undefined.

    mpSdk.Settings.get('labels')
      .then(function(data) {
        // Setting retrieval complete.
        console.log('Labels setting: ' + data);
      })
      .catch(function(error) {
        // Setting  retrieval error.
      });
    

    Parameters

    • key: string

    Returns Promise<any | undefined>

update

  • update(key: string, value: any): Promise<void>
  • This function updates the value of a setting if it exists, returning the new value when it is set

    mpSdk.Settings.update('labels', false)
      .then(function(data) {
        // Setting update complete.
        console.log('Labels setting: ' + data);
      })
      .catch(function(error) {
        // Setting update error.
      });
    

    Parameters

    • key: string
    • value: any

    Returns Promise<void>