# BaiduLocation **Repository Path**: bin-cn/BaiduLocation ## Basic Information - **Project Name**: BaiduLocation - **Description**: cordova 百度定位插件 - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2015-06-04 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README BaiduLocation ============== BaiduLocation for Cordova / PhoneGap. ### Supported Platforms - Android ## Using the plugin ## The plugin creates the object `cordova.plugins.baiduLocation` with the method `getCurrentPosition(success, fail, options)`. `success` and `fail` are callback functions. A full example could be: ``` cordova.plugins.baiduLocation.getCurrentPosition(function(pos){ alert(JSON.stringify(pos)) cordova.plugins.baiduLocation.stop(noop,noop) },function(e){ alert(JSON.stringify(e)) cordova.plugins.baiduLocation.stop(noop,noop) }, { coorType: 'gcj02', //国测局经纬度坐标系:gcj02,百度墨卡托坐标系:bd09,返回百度经纬度坐标系:bd09ll enableHighAccuracy: false, timeout: 10000, scanSpan: 0, isNeedAddress: false }); ```