Introduced "ol.API" @define which will allow in future to compile HPI apps with the OL. Discussed in ol3-sprint mailing-list.

This commit is contained in:
Petr Pridal
2012-06-23 23:06:45 +02:00
parent b615eb94b7
commit 587512cac8
11 changed files with 49 additions and 41 deletions

View File

@@ -34,13 +34,13 @@ ol.projection = function(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'];
if (goog.isString(ol.API ? opt_arg['code'] : opt_arg.code)) {
code = ol.API ? opt_arg['code'] : opt_arg.code;
} else {
throw new Error('Projection requires a string code.');
}
units = opt_arg['units'];
extent = opt_arg['maxExtent'];
units = ol.API ? opt_arg['units'] : opt_arg.units;
extent = ol.API ? opt_arg['maxExtent'] : opt_arg.maxExtent;
}
else {
throw new Error('ol.projection');