# 二、映射關系

[高德地圖api比例尺][https://www.cnblogs.com/yesyes/p/6785705.html]

# 三、轉換方法

``    /**     * “scale-zoom”映射關系：https://www.cnblogs.com/yesyes/p/6785705.html     *     * @param scale 比例尺     * @return zoom值     */    private int scale2Zoom(int scale) {        if (scale <= 10) return 19;        else if (scale <= 25) return 18;        else if (scale <= 50) return 17;        else if (scale <= 100) return 16;        else if (scale <= 200) return 15;        else if (scale <= 500) return 14;        else if (scale <= 1000) return 13;        else if (scale <= 2000) return 12;        else if (scale <= 5000) return 11;        else if (scale <= 10000) return 10;        else if (scale <= 20000) return 9;        else if (scale <= 30000) return 8;        else if (scale <= 50000) return 7;        else if (scale <= 100000) return 6;        else if (scale <= 200000) return 5;        else if (scale <= 500000) return 4;        else if (scale <= 1000000) return 3;        else if (scale > 1000000) return 2;        return 20;    }``