
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
react-native-x-amap-location
Advanced tools
安装
npm install git+https://git.feelbang.com/React-Native-Plugin/react-native-amap-location.git --save
安装 (iOS)
1、运行react native link
2、将Extern目录拖进主project目录下, 选择copy items if needed, create groups, 另外add to target不要忘记选择主project.
3、点击你的主project, 选择Build Phases -> Link Binary With Libraries,将Extern中的文件拖进去
4、Link Binary With Libraries 添加
libz.tdb
libc++.tbd
libstdc++.6.0.9.tbd
GLKit.framework
Security.framework
CoreTelephony.framework
SystemConfiguration.framework
5、在AppDelegate.m添加
#import <AMapFoundationKit/AMapFoundationKit.h>
[AMapServices sharedServices].apiKey = @"高德地图key";//9eebba67761ead77e9ad57128bdfb1eb
安装 (Android)
1、在AndroidManifest.xml中, 加入所需权限
<!-- Normal Permissions 不需要运行时注册 -->
<!--获取运营商信息,用于支持提供运营商信息相关的接口-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--用于访问wifi网络信息,wifi信息会用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<!-- 请求网络 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 不是SDK需要的权限,是示例中的后台唤醒定位需要的权限 -->
<!--<uses-permission android:name="android.permission.WAKE_LOCK" />-->
<!-- 需要运行时注册的权限 -->
<!--用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!--用于访问GPS定位-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--用于提高GPS定位速度-->
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<!--写入扩展存储,向扩展卡写入数据,用于写入缓存定位数据-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--读取缓存数据-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--用于读取手机当前的状态-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- 更改设置 -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
2、在AndroidManifest.xml中, application标签内加入
<meta-data android:name="com.amap.api.v2.apikey" android:value="请填写您的key"/>
<!-- 高德地图APS服务设置 -->
<service android:name="com.amap.api.location.APSService" ></service>
FAQs
The npm package react-native-x-amap-location receives a total of 0 weekly downloads. As such, react-native-x-amap-location popularity was classified as not popular.
We found that react-native-x-amap-location demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.