Leaflet Circle radius changing dependant on y/lng coords

老子叫甜甜 提交于 2019-12-02 00:54:27

Turns out there are a load of todos in the leaflet 0.7 code... including this little gem :

// TODO Earth hardcoded, move into projection code!

_getLatRadius: function () {
    return (this._mRadius / 40075017) * 360;
},

_getLngRadius: function () {
    return this._getLatRadius() / Math.cos(L.LatLng.DEG_TO_RAD * this._latlng.lat);
},

Updated to 0.8Dev and it has all been fixed!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!