tyao1 / react-native-amap-location Goto Github PK
View Code? Open in Web Editor NEWAndroid amap location sdk for react native
License: MIT License
Android amap location sdk for react native
License: MIT License
按照配置的要求进行配置,可是出现了errorcode为12的错误,求问解决方案
启动后,设置定时回调无效, interval: 1500,就是说这个参数无效,
根据高德地图定位SDK,AMapLocationMode.High_Accuracy应该为AMapLocationMode.Hight_Accuracy
请问
undefined is not an object (evaluating 'AMapLocation.startLocation')
这个问题解决没有?
我的环境是
react-native 0.39.2
android 4.4
我重新react-native run-android了不行
然后把原来安装的app卸载再运行也不行!
求助!
D:\react\demo1\android\app\src\main\java\com\demo1\MainActivity.java:28: 错误: 方法不会覆盖或实现超类型的方法
@OverRide
RT
Could not identify launch activity: Default Activity not found
Error while Launching activity
这个SDK只能定位吗?能否显示mark,并且有mark的点击事件处理?
Object {street: "", district: "", city: "", locationDetail: "", provider: "gps"…}
为什么不维护了
this.unlisten = AMapLocation.addEventListener((data) =>{
debugger;
console.log(data);
这个函数只能执行一次什么鬼?
能正常读取坐标,但是偶尔会出现 {errorInfo: "KEY错误", errorCode: 7}
按照你的代码操作的,但是控制台一直输出
errorCode: 10errorInfo: "定位服务启动失败"
请问是key的问题吗?因为key要添加sha1的绑定,这个地方不知道是不是操作错误导致的。
还有
srsettings.gradle 这个文件貌似不存在,我自己建了一个,和这个有关吗
内容
<!--用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<!--用于访问GPS定位-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<!--获取运营商信息,用于支持提供运营商信息相关的接口-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<!--用于访问wifi网络信息,wifi信息会用于进行网络定位-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<!--这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位-->
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
<!--用于访问网络,网络定位需要上网-->
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<!--用于读取手机当前的状态-->
<uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
<!--写入扩展存储,向扩展卡写入数据,用于写入缓存定位数据-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<service android:name="com.amap.api.location.APSService"></service>
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="key"/>
这个意思是我的WiFi信号不行吗 还是什么原因 求解答
import React, { Component } from 'react';
import { View, Text, TouchableHighlight, StyleSheet, InteractionManager } from 'react-native';
import AMapLocation from 'react-native-amap-location';
class Amap extends Component {
componentDidMount() {
this.listener = AMapLocation.addEventListener((data) => console.log('data', data));
AMapLocation.startLocation({
accuracy: 'HighAccuracy',
killProcess: true,
needDetail: true,
});
}
componentWillUnmount() {
AMapLocation.stopLocation();
this.listener.remove();
}
render() {
return (
<View style={{flexDirection: 'row', alignItems: 'center'}}></View>
);
}
}
export default Amap;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.