Implementation

Add the MetaMap button to your HTML file:

HTML Example for Cordova

 <input
     class="metaMapButton"
     id="metaMapButton"
     type="button"
     value="show MetaMap Flow"
  />

JavaScript Example for Cordova

 function onDeviceReady() {
 var metaMapButton = document.getElementById("metaMapButton");

   metaMapButton.onclick = () => {
       cordova.plugins.MetaMapGlobalIDSDK.showMetaMapFlow({ clientId: "YOUR_CLIENT_ID", 
                                                           flowId: "YOUR_FLOW_ID", 
                                                           metadata: {:}})
     };
     cordova.plugins.MetaMapGlobalIDSDK.setMetaMapCallback(
      params => {
        console.log("setMetaMapCallback success: " + params.identityId);
        console.log("setMetaMapCallback success: " + params.verificationID);
      },
      error => {
        console.log("setMetaMapCallback error: " + error);
      }
     );
 }

In order to make this work you need to set your own CLIENT_ID and FLOW_ID. You can find them in the Metamap Dashboard, for more details please check this section.