[OpenLayers-Commits] r2018 - trunk/openlayers/lib/OpenLayers
commits at openlayers.org
commits at openlayers.org
Wed Dec 6 16:29:37 EST 2006
Author: crschmidt
Date: 2006-12-06 16:29:36 -0500 (Wed, 06 Dec 2006)
New Revision: 2018
Modified:
trunk/openlayers/lib/OpenLayers/Layer.js
Log:
This is a partial fix to the fact that putting WMS overlays over WMS does not
use the same grid boundaries as the underlying tiles, although not a complete
fix.
Modified: trunk/openlayers/lib/OpenLayers/Layer.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer.js 2006-12-06 21:25:19 UTC (rev 2017)
+++ trunk/openlayers/lib/OpenLayers/Layer.js 2006-12-06 21:29:36 UTC (rev 2018)
@@ -508,8 +508,8 @@
var center = this.map.getCenter();
var res = this.map.getResolution();
- var delta_x = viewPortPx.x - (size.w / 2);
- var delta_y = viewPortPx.y - (size.h / 2);
+ var delta_x = viewPortPx.x - Math.ceil(size.w / 2);
+ var delta_y = viewPortPx.y - Math.ceil(size.h / 2);
lonlat = new OpenLayers.LonLat(center.lon + delta_x * res ,
center.lat - delta_y * res);
More information about the Commits
mailing list