以下是自定义函数内容: package com.fr.function; import com.fr.script.AbstractFunction; /** * Created by pan on 2015/8/26. */ public class TranslateToBaidu extends AbstractFunction{ private static final double x_pi = 3.14159265358979324 * 3000.0 / 180.0; private static final double pi = 3.14159265358979324; private static final double a = 6378245.0; private static final double ee = 0.00669342162296594323; public Object run(Object[] args){ /*获取google地图的经纬度坐标*/ double lon_lat[] = new double[2]; String []temp = null; temp = args[0].toString().split(","); lon_lat[0] = Double.valueOf(temp[0]); lon_lat[1] = Double.valueOf(temp[1]); double x = lon_lat[0], y = lon_lat[1]; 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); double bd_lon = z * Math.cos(theta) + 0.0065; double bd_lat = z * Math.sin(theta) + 0.006; String result = String.valueOf(bd_lon)+","+String.valueOf(bd_lat); return result; } } 编译不提示成功,日志报这个错误。哪位大神帮看一下哪里出了问题? |