{"_id":"@1ziton/react-native-baidulocation","_rev":"4-532ce0b63e4213026bbe28ed72e44d24","name":"@1ziton/react-native-baidulocation","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@1ziton/react-native-baidulocation","version":"1.0.0","description":"百度定位","main":"","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native","百度定位"],"author":"","license":"","peerDependencies":{"react-native":"0.59.1"},"gitHead":"9a84eeddd7b5ae8feed1cc3042d5a052f50c9dd5","_id":"@1ziton/react-native-baidulocation@1.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-3EZDryTjNKHeOSySLFLsFIOcVOKnQEr2IuJ8kSlus2aGLarZBiQGPTW4dFfWmPwT3shl6JnX91w/5moxYpWtYg==","shasum":"18cf8b95e1d9cac12895ace6ceee067d6867968a","tarball":"https://registry.npmjs.org/@1ziton/react-native-baidulocation/-/react-native-baidulocation-1.0.0.tgz","fileCount":27,"unpackedSize":3570390,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdW7cXCRA9TVsSAnZWagAAQvcQAJY24eepm+YHGk39CMLf\ndnZFF5pOTfiPI3IewMH4blMUXG+O7rGL7wu9aSE/zc1BkMXI+TBDjR7H4GlM\nAS7YtweJpR69y0B2FjEAByAnV85Sr3KswdwIZ6ixiOpswS+F0dD0ElzFkpyh\nbTw4oR67T2aoLe1IoTOkiOrVkuzegMLrz5j6Ugw1RDALG/XolYKiycUgUvUC\nT3GYZI87E4z998jHILPe1fPaYXUwwJEhIQ2iJEK7tPG2sibfSQs89bq1mNqc\nxVFa7+Y6kVJQVLtDfIm7pAFJmi9Y1Y/FxZE5t1GBL3eJaTkgE2vqt7ziYVFv\n61Ot6jbjuCx4AO1/Ku4TKrGwpNXuZTUO6mlVcAtuGcZOsPKlyVTxbGCeDilJ\nakn3l3SwZCJtxzYVvSgxov8p91RgY2kqffT+7C3tDSjWGApf7B+XqElZJhgO\n+qRIqx+bEPIvNCWe0k2uR2++6cNBR0g/lAEWlY42HAWpBR6sJam3xX2vE0fK\n6iVNeT6eFWrb36YkVjmUDENpvC9RpjN7OJpp4lhgmlJEyeVVlX+m+8NGekUO\nwm5qMKKwXMntxov0EKTlaveeb13+q5dAhYveEaSP8c7+ZbCya5wj0ggw03Mj\nN4jCkyBwF3DkRZewSqp66FEYhxlHidFpA89ZpkDKfU/mPf+pQ8I3Avfj60Ce\negcD\r\n=KvaY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB3rK45vjDphW9fHqc+F0t2SiHFz5Bgp5m2wHRcr/lOmAiAocJO0+kC3+YQ3dIY2lnd/bxWmL60RH8b5wMDXArCKfw=="}]},"maintainers":[{"name":"wuyuxing","email":"359827672@qq.com"},{"name":"xinzhenyong","email":"494063647@qq.com"},{"name":"tangjijun","email":"920449619@qq.com"},{"name":"giscafer","email":"giscafer@outlook.com"}],"_npmUser":{"name":"xinzhenyong","email":"494063647@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-baidulocation_1.0.0_1566291734871_0.38686063115604163"},"_hasShrinkwrap":false},"1.0.1":{"name":"@1ziton/react-native-baidulocation","version":"1.0.1","description":"百度定位","main":"","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native","百度定位"],"author":"","license":"","peerDependencies":{"react-native":"0.59.1"},"gitHead":"f1f236e807971c8bc9a07b3bca8f21b4ca42e325","_id":"@1ziton/react-native-baidulocation@1.0.1","_nodeVersion":"10.16.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-xHCbhuMfXs8cwfYhNNvdXcUlUTkE/ErxGvP8jIsJXn9imn5m439QmmJYNx+RhFEnZ/CfpAFUTtymODOnw8ockw==","shasum":"81f32905534062a3141dcd345e705d999ec3820c","tarball":"https://registry.npmjs.org/@1ziton/react-native-baidulocation/-/react-native-baidulocation-1.0.1.tgz","fileCount":27,"unpackedSize":3570304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdW7+LCRA9TVsSAnZWagAASY0P/RHU24B3Oc4YX3m4Y6GH\nACMoY1FllKaZC7Yklv6sqEyubAm3GJhK/soqizOO4gzDGNX5S6WLbE9jMa0Z\nweFVdobRSvDxCzo8bQ4apeR43MRiPQ53R/y2qWo2zGiyneNDNbPF9LCPB2GT\njMcNrsgNm6z33HfNitEJdOXk2uPAYcfiqMYf5rHNayuSyTtT6IotR2xrYD3m\nReK4JTkfTic0t4Kl1Iv5aBy09ys7IGYurRQKJyhz2/k8jguF2c/Q7QLb8xwz\nxv+qpOGgGbs87ZVpcvyYJSiEbwUSLOyocQxuMpAjpDjUAzoT0XpNk2jjj5vT\ntLFVi8A/Gsg4640bQZKT09MwcDYZws3lyMVeUgZz5UREoUUmIGOC1ee1oZTj\nnUQuR3ors6oluDxA7bR0UM97mNOKbUIaGX5hoc9SPftnfLaCjvhzrn36xcK+\nw8qTlzSjU0ienm5AhN0lo20l5pfMuOV7bAddgsLJ3BXUc35js/2StMa/6BlU\nD2Vj6ypWX126ThKzDIBMtvvOUeecDNlfI0X1TEO3wMoOVSqg0gJt6+RWqWUH\n3BWXbeoyCZG6J1BGyBS8Ayh89KOXgbPYvIVWFq8ql686VO8DJuSYG8lHsCdA\n83/9746sCeg+552oFTzrK7735rZ2mB7AOr9XDNeAXBnrP+kfOB8rHYuhQBme\n1811\r\n=sndf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEbtcMOPMgnhvN0g9mYnskUORUSo9J8qWt+PN0Lgyt8FAiBsKlfHyjZthK9oIVmFfWoRWh+o6x23ZoDn2R7TBtfg3Q=="}]},"maintainers":[{"name":"giscafer","email":"giscafer@outlook.com"},{"name":"tangjijun","email":"920449619@qq.com"},{"name":"wuyuxing","email":"359827672@qq.com"},{"name":"xinzhenyong","email":"494063647@qq.com"}],"_npmUser":{"name":"xinzhenyong","email":"494063647@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-baidulocation_1.0.1_1566293898733_0.22316245164080661"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-20T09:02:14.575Z","1.0.0":"2019-08-20T09:02:15.050Z","modified":"2022-04-04T10:34:47.831Z","1.0.1":"2019-08-20T09:38:18.931Z"},"maintainers":[{"email":"it@1ziton.com","name":"yztnpm"},{"email":"359827672@qq.com","name":"wuyuxing"},{"email":"494063647@qq.com","name":"xinzhenyong"},{"email":"giscafer@outlook.com","name":"giscafer"}],"description":"百度定位","keywords":["react-native","百度定位"],"readme":"﻿\n# @1ziton/react-native-baidulocation\n# 百度定位\n## Getting started\n\n`$ npm install @1ziton/react-native-baidulocation --save`\n\n### Mostly automatic installation\n\n`$ react-native link @1ziton/react-native-baidulocation`\n\n### Manual installation\n\n\n#### iOS\n\n1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`\n2. Go to `node_modules` ➜ `react-native-baidulocation` and add `RNbaidulocation.xcodeproj`\n3. In XCode, in the project navigator, select your project. Add `libRNbaidulocation.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n4. Run your project (`Cmd+R`)<\n\n#### Android\n\n1. Open up `android/app/src/main/java/[...]/MainApplication.java`\n  - Add `import com.dashixiong.baidulocation.LocationReactPackage;` to the imports at the top of the file\n  - Add `new LocationReactPackage()` to the list returned by the `getPackages()` method\n2. Append the following lines to `android/settings.gradle`:\n  \t```\n  \tinclude ':@1ziton_react-native-baidulocation'\n    project(':@1ziton_react-native-baidulocation').projectDir = new File(rootProject.projectDir, \t'../node_modules/@1ziton/react-native-baidulocation/android')\n  \t```\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n  \t```\n      implementation project(':@1ziton_react-native-baidulocation')\n      1.在主项目的build.gradle 配置key\n          defaultConfig {\n        manifestPlaceholders = [\n                BAIDU_APPKEY:'yourkey'\n        ]\n\n    }\n    2.在主项目的AndroidManifest.xml配置\n          <meta-data\n        android:name=\"com.baidu.lbsapi.API_KEY\"\n        android:value=\"${BAIDU_APPKEY}\" />\n  \t```\n\n\n\n## Usage\n```javascript\nimport {\n  NativeModules\n} from 'react-native';\nconst { LocationModule } = NativeModules;\n\n      componentDidMount() {\n    if (Platform.OS === ANDROID) {\n      LocationModule.locationNow();\n    }\n  }\n\n    LocationModule.getLocation()\n        .then((result) => {\n          const locationData = JSON.parse(result);\n          if (locationData.errorCode === 0) {\n            let { longitude, latitude } = locationData;\n          } else ToastUtil.center('定位失败，请重试');\n        })\n        .catch(() => {\n          ToastUtil.center('定位失败，请重试');\n        });\n    }\n```\n\n```","readmeFilename":"README.md"}