Merge pull request #137 from fredj/simple-objects
Replace Size and Pixel instances with simple objects. r=elemoine,probins,tschaub
This commit is contained in:
@@ -645,8 +645,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
center.lon + (tileWidth/2),
|
||||
center.lat + (tileHeight/2));
|
||||
|
||||
var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top);
|
||||
var px = this.map.getLayerPxFromLonLat(ul);
|
||||
var px = this.map.getLayerPxFromLonLat({
|
||||
lon: tileBounds.left,
|
||||
lat: tileBounds.top
|
||||
});
|
||||
|
||||
if (!this.grid.length) {
|
||||
this.grid[0] = [];
|
||||
@@ -1002,9 +1004,10 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
var offsetX = parseInt(this.map.layerContainerDiv.style.left);
|
||||
var offsetY = parseInt(this.map.layerContainerDiv.style.top);
|
||||
var tlViewPort = tlLayer.add(offsetX, offsetY);
|
||||
var tileSize = this.tileSize.clone();
|
||||
tileSize.w *= scale;
|
||||
tileSize.h *= scale;
|
||||
var tileSize = {
|
||||
w: this.tileSize.w * scale,
|
||||
h: this.tileSize.h * scale
|
||||
};
|
||||
if (tlViewPort.x > -tileSize.w * (buffer - 1)) {
|
||||
this.shiftColumn(true);
|
||||
} else if (tlViewPort.x < -tileSize.w * buffer) {
|
||||
|
||||
Reference in New Issue
Block a user