百度坐标转换为高德坐标进行导航

+ (CLLocationCoordinate2D)bd09Decrypt:(double)bdLat bdLon:(double)bdLon {

CLLocationCoordinate2D gcjPt;

double x = bdLon - 0.0065, y = bdLat - 0.006;

double z = sqrt(x * x + y * y) - 0.00002 * sin(y * M_PI);

double theta = atan2(y, x) - 0.000003 * cos(x * M_PI);

gcjPt.longitude = z * cos(theta);

gcjPt.latitude = z * sin(theta);

return gcjPt;

}

你可能感兴趣的:(百度坐标转换为高德坐标进行导航)