29 lines
650 B
JavaScript
29 lines
650 B
JavaScript
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
|
|
} |