如何使用Cordova / PhoneGap跟踪地理位置?

时间:2015-10-27 13:45:52

标签: android ios windows-phone phonegap-plugins cordova-plugins

我曾尝试使用org.transistorsoft.cordova.background-geolocation来跟踪背景中的地理位置,但它有问题,并且存在电池问题。我可以使用哪些方法在后台跟踪地理位置?

1 个答案:

答案 0 :(得分:1)

您是否查看了PhoneGap文档?他们有several methods地理位置(getCurrentPositionwatchPositionclearWatch)。

This thread可能有所帮助,但没有一个答案被接受或投票。

我也遇到了你可能想要查看的this GitHub repository

<强>灌注

cordova plugin add https://github.com/transistorsoft/cordova-background-geolocation.git

使用

该插件会创建对象window.BackgroundGeolocation。有关详细信息,请参阅API Documentation