Move to-be-merged code into attic

This commit is contained in:
Tom Payne
2012-08-07 12:11:25 +02:00
parent 1f5cda88c4
commit 9366ced2a8
36 changed files with 0 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
goog.provide('ol.layer.xyz');
goog.require('ol.layer.XYZ');
/**
* @export
* @param {Object} opt_arg Config object.
* @return {ol.layer.XYZ}
*/
ol.layer.xyz = function(opt_arg) {
if (opt_arg instanceof ol.layer.XYZ) {
return opt_arg;
}
/** @type {string} */
var url;
var usage = 'ol.layer.xyz accepts an object with a "url" property';
if (goog.isObject(opt_arg)) {
url = ol.API ? opt_arg['url'] : opt_arg.url;
} else {
throw new Error(usage);
}
if (!goog.isDef(url)) {
throw new Error(usage);
}
return new ol.layer.XYZ(url);
};