Merge pull request #290 from bbinet/projection_stuff

Add a getMetersPerUnit instance method to ol.Projection class
This commit is contained in:
Bruno Binet
2013-03-06 08:50:47 -08:00
2 changed files with 27 additions and 1 deletions

View File

@@ -221,7 +221,6 @@ describe('ol.projection', function() {
});
describe('ol.projection.getTransformFromCodes()', function() {
it('returns a function', function() {
@@ -321,6 +320,15 @@ describe('ol.projection', function() {
});
describe('ol.Projection.prototype.getMetersPerUnit()', function() {
it('returns value in meters', function() {
var epsg4326 = ol.projection.getFromCode('EPSG:4326');
expect(epsg4326.getMetersPerUnit()).toEqual(111194.87428468118);
});
});
});
goog.require('goog.array');