Simplify meters per unit handling

This commit is contained in:
Andreas Hocevar
2016-01-06 13:46:29 +01:00
parent 607d8ad154
commit 24f8cba0a1
5 changed files with 37 additions and 13 deletions

View File

@@ -554,7 +554,8 @@ describe('ol.proj', function() {
it('returns value in meters', function() {
var epsg4326 = ol.proj.get('EPSG:4326');
expect(epsg4326.getMetersPerUnit()).to.eql(111194.87428468118);
expect(epsg4326.getMetersPerUnit()).to.eql(
ol.proj.EPSG4326.METERS_PER_UNIT);
});
it('works for proj4js projections without units', function() {
@@ -582,6 +583,7 @@ describe('ol.proj', function() {
goog.require('ol.proj');
goog.require('ol.proj.EPSG4326');
goog.require('ol.proj.Projection');
goog.require('ol.proj.Units');
goog.require('ol.proj.common');