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

@@ -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;

View File

@@ -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);
}