add layers and resolutions array

This commit is contained in:
Mike Adair
2012-06-19 11:17:55 -04:00
parent 28955dc0b1
commit 6ed79a3d36
3 changed files with 103 additions and 2 deletions

View File

@@ -125,3 +125,27 @@ ol.Map.prototype.numZoomLevels = function(opt_arg) {
return this.getNumZoomLevels();
}
};
/**
* @param {Array=} opt_arg
* @returns {ol.Map|Array|undefined} Map center.
*/
ol.Map.prototype.resolutions = function(opt_arg) {
if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setResolutions(opt_arg);
} else {
return this.getResolutions();
}
};
/**
* @param {Array=} opt_arg
* @returns {ol.Map|Array|undefined} Map center.
*/
ol.Map.prototype.layers = function(opt_arg) {
if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setLayers(opt_arg);
} else {
return this.getLayers();
}
};