change indentation.
This commit is contained in:
@@ -15,7 +15,7 @@ ol.LocLike;
|
|||||||
* @param {ol.LocLike} loc Location.
|
* @param {ol.LocLike} loc Location.
|
||||||
* @return {ol.Loc} Location.
|
* @return {ol.Loc} Location.
|
||||||
*/
|
*/
|
||||||
ol.loc = function(loc) {
|
ol.loc = function(loc){
|
||||||
|
|
||||||
if (loc instanceof ol.Loc) {
|
if (loc instanceof ol.Loc) {
|
||||||
return loc;
|
return loc;
|
||||||
@@ -36,7 +36,9 @@ ol.loc = function(loc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (goog.isObject(loc)) {
|
}
|
||||||
|
else
|
||||||
|
if (goog.isObject(loc)) {
|
||||||
if (goog.isDef(loc.x)) {
|
if (goog.isDef(loc.x)) {
|
||||||
x = loc.x;
|
x = loc.x;
|
||||||
}
|
}
|
||||||
@@ -49,7 +51,8 @@ ol.loc = function(loc) {
|
|||||||
if (goog.isDef(loc.projection)) {
|
if (goog.isDef(loc.projection)) {
|
||||||
projection = loc.projection;
|
projection = loc.projection;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
throw new Error('ol.loc');
|
throw new Error('ol.loc');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,10 +66,11 @@ ol.loc = function(loc) {
|
|||||||
* @param {ol.Projection=} opt_arg Projection.
|
* @param {ol.Projection=} opt_arg Projection.
|
||||||
* @return {ol.Loc|ol.Projection|undefined} Result.
|
* @return {ol.Loc|ol.Projection|undefined} Result.
|
||||||
*/
|
*/
|
||||||
ol.Loc.prototype.projection = function(opt_arg) {
|
ol.Loc.prototype.projection = function(opt_arg){
|
||||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||||
return this.setProjection(opt_arg);
|
return this.setProjection(opt_arg);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return this.getProjection();
|
return this.getProjection();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -77,10 +81,11 @@ ol.Loc.prototype.projection = function(opt_arg) {
|
|||||||
* @param {number=} opt_arg X.
|
* @param {number=} opt_arg X.
|
||||||
* @return {ol.Loc|number} Result.
|
* @return {ol.Loc|number} Result.
|
||||||
*/
|
*/
|
||||||
ol.Loc.prototype.x = function(opt_arg) {
|
ol.Loc.prototype.x = function(opt_arg){
|
||||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||||
return this.setX(opt_arg);
|
return this.setX(opt_arg);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return this.getX();
|
return this.getX();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -91,10 +96,11 @@ ol.Loc.prototype.x = function(opt_arg) {
|
|||||||
* @param {number=} opt_arg Y.
|
* @param {number=} opt_arg Y.
|
||||||
* @return {ol.Loc|number} Result.
|
* @return {ol.Loc|number} Result.
|
||||||
*/
|
*/
|
||||||
ol.Loc.prototype.y = function(opt_arg) {
|
ol.Loc.prototype.y = function(opt_arg){
|
||||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||||
return this.setY(opt_arg);
|
return this.setY(opt_arg);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return this.getY();
|
return this.getY();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -105,10 +111,11 @@ ol.Loc.prototype.y = function(opt_arg) {
|
|||||||
* @param {number=} opt_arg Z.
|
* @param {number=} opt_arg Z.
|
||||||
* @return {ol.Loc|number|undefined} Result.
|
* @return {ol.Loc|number|undefined} Result.
|
||||||
*/
|
*/
|
||||||
ol.Loc.prototype.z = function(opt_arg) {
|
ol.Loc.prototype.z = function(opt_arg){
|
||||||
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
if (arguments.length == 1 && goog.isDef(opt_arg)) {
|
||||||
return this.setZ(opt_arg);
|
return this.setZ(opt_arg);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return this.getZ();
|
return this.getZ();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ ol.MapLike;
|
|||||||
* @param {ol.MapLike=} opt_arg Argument.
|
* @param {ol.MapLike=} opt_arg Argument.
|
||||||
* @return {ol.Map} Map.
|
* @return {ol.Map} Map.
|
||||||
*/
|
*/
|
||||||
ol.map = function(opt_arg) {
|
ol.map = function(opt_arg){
|
||||||
|
|
||||||
/** @type {ol.Loc|undefined} */
|
/** @type {ol.Loc|undefined} */
|
||||||
var center;
|
var center;
|
||||||
@@ -25,7 +25,9 @@ ol.map = function(opt_arg) {
|
|||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
if (opt_arg instanceof ol.Map) {
|
if (opt_arg instanceof ol.Map) {
|
||||||
return opt_arg;
|
return opt_arg;
|
||||||
} else if (goog.isObject(opt_arg)) {
|
}
|
||||||
|
else
|
||||||
|
if (goog.isObject(opt_arg)) {
|
||||||
var config = opt_arg;
|
var config = opt_arg;
|
||||||
if (goog.isDef(config.center)) {
|
if (goog.isDef(config.center)) {
|
||||||
center = ol.loc(config.center);
|
center = ol.loc(config.center);
|
||||||
@@ -33,7 +35,8 @@ ol.map = function(opt_arg) {
|
|||||||
if (goog.isDef(config.target)) {
|
if (goog.isDef(config.target)) {
|
||||||
target = config.target;
|
target = config.target;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
throw new Error('ol.map');
|
throw new Error('ol.map');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,17 @@ ol.ProjectionLike;
|
|||||||
* @param {ol.ProjectionLike=} opt_arg Argument.
|
* @param {ol.ProjectionLike=} opt_arg Argument.
|
||||||
* @return {ol.Projection} Projection.
|
* @return {ol.Projection} Projection.
|
||||||
*/
|
*/
|
||||||
ol.projection = function(opt_arg) {
|
ol.projection = function(opt_arg){
|
||||||
var code;
|
var code;
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
if (opt_arg instanceof ol.Projection) {
|
if (opt_arg instanceof ol.Projection) {
|
||||||
return opt_arg;
|
return opt_arg;
|
||||||
} else if (goog.isString(arguments[0])) {
|
}
|
||||||
|
else
|
||||||
|
if (goog.isString(arguments[0])) {
|
||||||
code = arguments[0];
|
code = arguments[0];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
throw new Error('ol.projection');
|
throw new Error('ol.projection');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,10 +37,11 @@ ol.projection = function(opt_arg) {
|
|||||||
* @param {string=} opt_code Code.
|
* @param {string=} opt_code Code.
|
||||||
* @return {ol.Projection|string} Result.
|
* @return {ol.Projection|string} Result.
|
||||||
*/
|
*/
|
||||||
ol.Projection.prototype.code = function(opt_code) {
|
ol.Projection.prototype.code = function(opt_code){
|
||||||
if (goog.isDef(opt_code)) {
|
if (goog.isDef(opt_code)) {
|
||||||
return this.setCode(opt_code);
|
return this.setCode(opt_code);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
return this.getCode();
|
return this.getCode();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user