3 module.exports.getInfo = function(source, callback) {
4 return source.getInfo(function(err, _info) {
11 Object.keys(_info).forEach(function(key) {
12 info[key] = _info[key];
15 if (info.vector_layers) {
17 info.scheme = undefined;
19 info.autoscale = true;
22 info.name = info.name || "Untitled";
23 info.center = info.center || [-122.4440, 37.7908, 12];
24 info.bounds = info.bounds || [-180, -85.0511, 180, 85.0511];
25 info.format = info.format || "png";
26 info.minzoom = Math.max(0, info.minzoom | 0);
27 info.maxzoom = info.maxzoom || Infinity;
29 info.type = "baselayer";
31 return callback(null, info);