Skip to content

kevinsturmanKT/cordova-plugin-measure

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-measure

Cordova plugin using ARKit(iOS) and ARCore(Android) to calculate distance of real world objects

Swift(iOS) original measure project: https://github.com/levantAJ/Measure Kotlin(Android) original measure project: https://github.com/Terran-Marine/ARCoreMeasuredDistance

Supported Platforms

Installation

cordova plugin add cordova-plugin-measure

Methods

  • cordova.plugins.measure.start
  • cordova.plugins.measure.onMeasureUpdate
  • cordova.plugins.measure.onFinish

start

Insert the camera view under the WebView

Parameters
Parameter Type Description
allowMultiplePoints Boolean If true allow the user to draw multiple measures
cordova.plugins.measure.start();

cordova.plugins.measure.start({allowMultiplePoints: true});

onMeasureUpdate

Set listener for event from measures

cordova.plugins.measure.onMeasureUpdate((data) => {});

// Example: data = {"10.00cm"}

onFinish

Set listener when the view is dismissed

cordova.plugins.measure.onFinish((data) => {});

/*
Examples:

IF allowMultiplePoints == FALSE:
data = "10.00cm"

IF allowMultiplePoints == TRUE:
data = ["10.00cm", "20.14cm", ...]
*/

TODO

FIX allowMultiplePoints on Android, It's always FALSE at the moment

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 44.3%
  • Kotlin 41.8%
  • JavaScript 13.9%