diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index babad41b69..e5fa551c9f 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -350,8 +350,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { // and translate the layer div as necessary var size = this.map.getSize(); - var lcX = parseInt(this.map.layerContainerDiv.style.left); - var lcY = parseInt(this.map.layerContainerDiv.style.top); + var lcX = parseInt(this.map.layerContainerDiv.style.left, 10); + var lcY = parseInt(this.map.layerContainerDiv.style.top, 10); var x = (lcX - (size.w / 2.)) * (scale - 1); var y = (lcY - (size.h / 2.)) * (scale - 1); @@ -368,7 +368,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * {Number} The resolution scale. */ getResolutionScale: function() { - return parseInt(this.div.style.width) / 100; + return parseInt(this.div.style.width, 10) / 100; }, /** @@ -830,8 +830,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { var tlLayer = this.grid[0][0].position.clone(); tlLayer.x *= scale; tlLayer.y *= scale; - tlLayer = tlLayer.add(parseInt(this.div.style.left), - parseInt(this.div.style.top)); + tlLayer = tlLayer.add(parseInt(this.div.style.left, 10), + parseInt(this.div.style.top, 10)); var offsetX = parseInt(this.map.layerContainerDiv.style.left); var offsetY = parseInt(this.map.layerContainerDiv.style.top); var tlViewPort = tlLayer.add(offsetX, offsetY);