且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用getRadius()以米为单位获取圆的光线

更新时间:2023-02-02 11:14:27

您可以使用ol.proj.METERS_PER_UNIT表获取以米为单位的半径:

You can use the ol.proj.METERS_PER_UNIT table to get the radius in meters:

var units = map.getView().getProjection().getUnits();
var radiusM = circle.getRadius() * ol.proj.METERS_PER_UNIT[units];