TMRAppBle/script/module/location.js

29 lines
650 B
JavaScript
Raw Normal View History

2023-10-19 15:00:17 +08:00
var bmLocation = null;
var bmLocationUtil = {
initLoc:function(){
bmLocation = api.require('bmLocation');
bmLocation.setAgreePrivacy({
agree: true
});
},
startLoc:function(){
bmLocation.start({
locatingWithReGeocode: true,
backgroundLocation: true
}, function(ret) {
callback(ret);
});
},
singleLocation:function(param,callback){
bmLocation.singleLocation({
reGeocode: false,
netWorkState: false
}, function (ret) {
callback(ret);
});
}
};
export {
bmLocationUtil
}