Do not overwrite projections in the registry

This commit is contained in:
Andreas Hocevar
2015-08-19 13:06:23 +02:00
parent 33da0e7b66
commit a8797ae1ff
2 changed files with 14 additions and 3 deletions

View File

@@ -299,6 +299,16 @@ describe('ol.proj', function() {
}
});
it('does not overwrite existing projections in the registry', function() {
var epsg4326 = ol.proj.get('EPSG:4326');
new ol.proj.Projection({
code: 'EPSG:4326',
units: 'degrees',
extent: [-45, -45, 45, 45]
});
expect(ol.proj.get('EPSG:4326')).to.equal(epsg4326);
});
});
describe('ol.proj.getTransformFromProjections()', function() {