fix for #843 - remove unnecesary url prepping in image tiles
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3768 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -159,7 +159,7 @@ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, {
|
||||
if(firstRendering) {
|
||||
//create the new tile
|
||||
this.tile = new OpenLayers.Tile.Image(this, ulPx, this.extent,
|
||||
this.url, this.tileSize);
|
||||
null, this.tileSize);
|
||||
} else {
|
||||
//just resize the tile and set it's new position
|
||||
this.tile.size = this.tileSize.clone();
|
||||
|
||||
@@ -88,8 +88,8 @@ OpenLayers.Layer.MapServer = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
||||
*/
|
||||
addTile:function(bounds,position) {
|
||||
var url = this.getURL(bounds);
|
||||
return new OpenLayers.Tile.Image(this, position, bounds, url, this.tileSize);
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
null, this.tileSize);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,9 +181,6 @@ OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(
|
||||
//determine new tile size
|
||||
this.setTileSize();
|
||||
|
||||
//formulate request url string
|
||||
var url = this.getURL(tileBounds);
|
||||
|
||||
//determine new position (upper left corner of new bounds)
|
||||
var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top);
|
||||
var pos = this.map.getLayerPxFromLonLat(ul);
|
||||
@@ -197,7 +194,7 @@ OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class(
|
||||
this.doneLoading = false;
|
||||
if (!this.tile) {
|
||||
this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds,
|
||||
url, this.tileSize);
|
||||
null, this.tileSize);
|
||||
this.tile.draw();
|
||||
var onload = function() {
|
||||
this.doneLoading = true;
|
||||
|
||||
@@ -116,9 +116,8 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
||||
*/
|
||||
addTile:function(bounds,position) {
|
||||
var url = this.getURL(bounds);
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
null, this.tileSize);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -162,9 +162,8 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
||||
*/
|
||||
addTile:function(bounds,position) {
|
||||
var url = this.getURL(bounds);
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
null, this.tileSize);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,16 +64,8 @@ OpenLayers.Layer.WorldWind = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
||||
* Method: addTile
|
||||
*/
|
||||
addTile:function(bounds,position) {
|
||||
if (this.map.getResolution() <= (this.lzd/512)
|
||||
&& this.getZoom() <= this.zoomLevels) {
|
||||
var url = this.getURL(bounds);
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
url, this.tileSize);
|
||||
} else {
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
OpenLayers.Util.getImagesLocation() + "blank.gif",
|
||||
this.tileSize);
|
||||
}
|
||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
||||
null, this.tileSize);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user