ArcGISCache layer should not generate x and y values of less than 0, p=dmiddlecamp, r=me (closes #3169)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11696 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -214,8 +214,8 @@ OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, {
|
||||
*/
|
||||
getContainingTileCoords: function(point, res) {
|
||||
return new OpenLayers.Pixel(
|
||||
Math.floor((point.x - this.tileOrigin.lon) / (this.tileSize.w * res)),
|
||||
Math.floor((this.tileOrigin.lat - point.y) / (this.tileSize.h * res))
|
||||
Math.max(Math.floor((point.x - this.tileOrigin.lon) / (this.tileSize.w * res)),0),
|
||||
Math.max(Math.floor((this.tileOrigin.lat - point.y) / (this.tileSize.h * res)),0)
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user