// 坐标转换
var br = Math.PI / 180,
    wr = 180 / Math.PI,
    Er = 20037508.342789;
function lngLatToMercator(t, e) {
    var i = [t, e];
    t instanceof Array
        ? (i = t)
        : t instanceof Object && (i = [t.lng, t.lat]);
    var r = (i[0] * Er) / 180,
        o = Math.log(Math.tan(((90 + i[1]) * br) / 2)) / br;
    return { x: r, y: (o = (o * Er) / 180) };
}
function mercatorToLngLat(t, e) {
    var i = [t, e];
    t instanceof Array ? (i = t) : t instanceof Object && (i = [t.x, t.y]);
    var r = (i[0] / Er) * 180,
        o = (i[1] / Er) * 180;
    return {
        lng: r,
        lat: (o = wr * (2 * Math.atan(Math.exp(o * br)) - Math.PI / 2))
    };
}

linvic
944 声望42 粉丝

console.log('hello FED');