Skip to content

Commit

Permalink
fix: fix getArea for circles
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasLohoff committed Jul 19, 2023
1 parent 5d93a4c commit 38a95f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MeasureUtil/MeasureUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ class MeasureUtil {
projection: map.getView().getProjection().getCode(),
radius
};
return getArea(circleGeom, opts);
const polygon = new OlGeomPolygon(circleGeom.getFlatCoordinates());
return getArea(polygon, opts);
} else {
return Math.PI * Math.pow(circleGeom.getRadius(), 2);
}
Expand Down

0 comments on commit 38a95f7

Please sign in to comment.