Coding standards: variable names to camel case
This commit is contained in:
@@ -1471,14 +1471,13 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
}
|
||||
|
||||
if ((center != null) && (resolution != null)) {
|
||||
var half_w_deg = (this.size.w * resolution) / 2;
|
||||
var half_h_deg = (this.size.h * resolution) / 2;
|
||||
|
||||
extent = new OpenLayers.Bounds(center.lon - half_w_deg,
|
||||
center.lat - half_h_deg,
|
||||
center.lon + half_w_deg,
|
||||
center.lat + half_h_deg);
|
||||
var halfWDeg = (this.size.w * resolution) / 2;
|
||||
var halfHDeg = (this.size.h * resolution) / 2;
|
||||
|
||||
extent = new OpenLayers.Bounds(center.lon - halfWDeg,
|
||||
center.lat - halfHDeg,
|
||||
center.lon + halfWDeg,
|
||||
center.lat + halfHDeg);
|
||||
}
|
||||
|
||||
return extent;
|
||||
@@ -2319,14 +2318,14 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
var res = OpenLayers.Util.getResolutionFromScale(scale,
|
||||
this.baseLayer.units);
|
||||
|
||||
var half_w_deg = (this.size.w * res) / 2;
|
||||
var half_h_deg = (this.size.h * res) / 2;
|
||||
var halfWDeg = (this.size.w * res) / 2;
|
||||
var halfHDeg = (this.size.h * res) / 2;
|
||||
var center = this.getCachedCenter();
|
||||
|
||||
var extent = new OpenLayers.Bounds(center.lon - half_w_deg,
|
||||
center.lat - half_h_deg,
|
||||
center.lon + half_w_deg,
|
||||
center.lat + half_h_deg);
|
||||
var extent = new OpenLayers.Bounds(center.lon - halfWDeg,
|
||||
center.lat - halfHDeg,
|
||||
center.lon + halfWDeg,
|
||||
center.lat + halfHDeg);
|
||||
this.zoomToExtent(extent, closest);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user