其实就是百度转火星坐标


 public static double[] bd2gcj(double[] locs) {
    double x = locs[1] - 0.0065, y = locs[0] - 0.006;
    double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
    double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
    locs[1] = z * Math.cos(theta);
    locs[0] = z * Math.sin(theta);
    return locs;
}

收图的小偷 answered 11 years ago

Your Answer