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:
@@ -21,9 +21,9 @@ ol.layer.wms = function(opt_arg) {
|
||||
|
||||
if (goog.isObject(opt_arg)) {
|
||||
ol.base.checkKeys(opt_arg, ['url', 'layers', 'format']);
|
||||
url = opt_arg['url'];
|
||||
layers = opt_arg['layers'];
|
||||
format = opt_arg['format'];
|
||||
url = ol.API ? opt_arg['url'] : opt_arg.url;
|
||||
layers = ol.API ? opt_arg['layers'] : opt_arg.layers;
|
||||
format = ol.API ? opt_arg['format'] : opt_arg.format;
|
||||
}
|
||||
|
||||
var msg;
|
||||
|
||||
@@ -18,7 +18,7 @@ ol.layer.xyz = function(opt_arg) {
|
||||
var usage = 'ol.layer.xyz accepts an object with a "url" property';
|
||||
|
||||
if (goog.isObject(opt_arg)) {
|
||||
url = opt_arg['url'];
|
||||
url = ol.API ? opt_arg['url'] : opt_arg.url;
|
||||
} else {
|
||||
throw new Error(usage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user