Use ol.base.checkKeys to check keys

This commit is contained in:
Tom Payne
2012-06-22 11:52:00 +02:00
parent afd6369da7
commit 3e15ce93bb
6 changed files with 19 additions and 17 deletions

View File

@@ -1,10 +1,11 @@
goog.provide('ol.projection');
goog.require('ol.base');
goog.require('ol.Projection');
/**
* @typedef {ol.Projection|string}
* @typedef {ol.Projection|Object|string}
*/
ol.ProjectionLike;
@@ -32,6 +33,7 @@ ol.projection = function(opt_arg){
code = opt_arg;
}
else if (goog.isObject(opt_arg)) {
ol.base.checkKeys(opt_arg, ['code', 'maxExtent', 'units']);
if (goog.isString(opt_arg['code'])) {
code = opt_arg['code'];
} else {