iOS开发 火星坐标转百度坐标

CLLocationCoordinate2D coor = CLLocationCoordinate2DMake(latitude, longitude);//原始坐标

  //转换 google地图、soso地图、aliyun地图、mapabc地图和amap地图所用坐标至百度坐标

  NSDictionary* testdic = BMKConvertBaiduCoorFrom(coor,BMK_COORDTYPE_GPS);

  //转换GPS坐标至百度坐标(加密后的坐标)

  testdic = BMKConvertBaiduCoorFrom(coor,BMK_COORDTYPE_GPS);

  NSLog(@"x=%@,y=%@",[testdic objectForKey:@"x"],[testdic objectForKey:@"y"]);

  //解密加密后的坐标字典

  CLLocationCoordinate2D baiduCoor = BMKCoorDictionaryDecode(testdic);//转换后的百度坐标

  return baiduCoor;

posted @ 2016-12-23 11:16  D-Ben  阅读(580)  评论(0编辑  收藏  举报