openlayer的测量有两种,如上图ol.Shere.getLength().....比较符合实际(使用大圆弧线进行计算)必须是4326的,
官网例子地址http://openlayers.org/en/latest/examples/measure.html
var formatArea = function (polygon) {
//这个geometry得是4326的
var geom=polygon.clone();
var geom4326=geom.transform("EPSG:3857","EPSG:4326");
var coordinates = geom4326.getLinearRing(0).getCoordinates();
var wgs84Sphere = new ol.Sphere(6378137);
var area = Math.abs(wgs84Sphere.geodesicArea(coordinates));