Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios 定位当前位置GPS转换百度位置并没有作用 #55

Closed
Xing-He opened this issue Feb 20, 2017 · 3 comments
Closed

ios 定位当前位置GPS转换百度位置并没有作用 #55

Xing-He opened this issue Feb 20, 2017 · 3 comments

Comments

@Xing-He
Copy link

Xing-He commented Feb 20, 2017

  • rn : 0.41.2
  • rn-baidu-map : 0.5.0
  • 模拟器运行

应该是下面这段代码转换坐标的吧,搜了下网上的写法,好像一样的,但不知道这个为什么转换不了

-(CLLocationCoordinate2D)getBaiduCoor:(double)lat lng:(double)lng {
    CLLocationCoordinate2D coor = CLLocationCoordinate2DMake(lat, lng);
    NSDictionary* testdic = BMKConvertBaiduCoorFrom(coor,BMK_COORDTYPE_COMMON);
    testdic = BMKConvertBaiduCoorFrom(coor,BMK_COORDTYPE_GPS);
    CLLocationCoordinate2D baiduCoor = BMKCoorDictionaryDecode(testdic);
    
    return baiduCoor;
}

1

@xubuhang
Copy link

@Xing-He 你好,rn-baidu-map你可以在ios上运行吗?我的是rn0.41,ios项目代码报错找不到文件路径。你遇到吗?

@Xing-He
Copy link
Author

Xing-He commented Feb 20, 2017

@xubuhang 可以的,能具体点报什么错误吗, #50 你参考下这个

@Xing-He
Copy link
Author

Xing-He commented Feb 20, 2017

  • 已解决
    模拟器不行,需要使用手机测试定位成功

@Xing-He Xing-He closed this as completed Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants