Skip to content
Permalink
Browse files

Fix measuring of area

  • Loading branch information...
raitisbe committed Jun 5, 2019
1 parent d6ec6d2 commit 443bbdbfecaa38976c0e57eaf582de86cbba6d4e
Showing with 1 addition and 3 deletions.
  1. +1 −3 components/measure/measure.js
@@ -287,9 +287,7 @@ angular.module('hs.measure', ['hs.map', 'hs.core'])
*/
var formatArea = function (polygon) {
var sourceProj = map.getView().getProjection();
var geom = /** @type {ol.geom.Polygon} */ (polygon.clone().transform(sourceProj, 'EPSG:4326'));
var coordinates = geom.getLinearRing(0).getCoordinates();
area = Math.abs(getArea(coordinates));
var area = Math.abs(getArea(polygon));
var output = {
size: area,
type: 'area',

0 comments on commit 443bbdb

Please sign in to comment.
You can’t perform that action at this time.