qiuxiang / react-native-amap3d

react-native 高德地图组件,使用最新 3D SDK,支持 Android + iOS
https://qiuxiang.github.io/react-native-amap3d/api/
MIT License
1.28k stars 328 forks source link

click `locationButton` location to `0,0` #426

Open Evansy opened 5 years ago

Evansy commented 5 years ago

环境:win 版本: "react": "16.5.0", "react-native": "0.57.1", "react-native-amap3d": "^1.0.2",

使用react-native-amap-geolocation可以拿到经纬度和位置,但是使用react-native-amap3d一点locationButton就定位到非洲了,然后监听回来的坐标是0,0

我猜react-native-amap3d应该是用了rngeolocation API,这个API在rn大于等于0.55时是依赖google service的,在国内用不了,

官方文档geolocation,不知道有木有react-native-amap-geolocationreact-native-amap3d整合使用的办法。

期望: react-native-amap-geolocation可以和react-native-amap3d整合使用

qiuxiang commented 5 years ago

我也考虑把 react-native-amap3d 的定位功能移除,只提供定位结果显示,定位功能通过 react-native-amap-geolocation,就像 react-native-baidumap-sdk 那样,不过 amap 的接口有点不一样,需要做一些处理。

Evansy commented 5 years ago

@qiuxiang 我就先不降级,自己画个按钮,通过react-native-amap-geolocation获取到经纬度让地图自己跳过去...,大佬有时间的话搞一下这个实现,我先订阅这个issue...

marshalys commented 3 years ago

@qiuxiang 请问下这个问题现在解决了么?