minor change to calculation of center points for bounds. less overhead.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@482 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -339,8 +339,8 @@ OpenLayers.Bounds.prototype = {
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
getCenterPixel:function() {
|
||||
return new OpenLayers.Pixel(this.left + (this.getWidth() / 2),
|
||||
this.bottom + (this.getHeight() / 2));
|
||||
return new OpenLayers.Pixel( (this.left + this.right) / 2,
|
||||
(this.bottom + this.top) / 2);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -348,8 +348,8 @@ OpenLayers.Bounds.prototype = {
|
||||
* @type OpenLayers.LonLat
|
||||
*/
|
||||
getCenterLonLat:function() {
|
||||
return new OpenLayers.LonLat(this.left + (this.getWidth() / 2),
|
||||
this.bottom + (this.getHeight() / 2));
|
||||
return new OpenLayers.LonLat( (this.left + this.right) / 2,
|
||||
(this.bottom + this.top) / 2);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user