move addTile code to the base class (OpenLayers.Layer.Grid). r=crschmidt (closes #2904)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11575 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -232,22 +232,5 @@ OpenLayers.Layer.ArcGIS93Rest = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
newArguments);
|
newArguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Layer.ArcGIS93Rest"
|
CLASS_NAME: "OpenLayers.Layer.ArcGIS93Rest"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -445,22 +445,5 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added image tile.
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(
|
|
||||||
this, position, bounds, null, this.tileSize
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Layer.ArcIMS"
|
CLASS_NAME: "OpenLayers.Layer.ArcIMS"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -629,9 +629,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: addTile
|
* APIMethod: addTile
|
||||||
* Gives subclasses of Grid the opportunity to create an
|
* Create a tile, initialize it, and add it to the layer div.
|
||||||
* OpenLayer.Tile of their choosing. The implementer should initialize
|
|
||||||
* the new tile and take whatever steps necessary to display it.
|
|
||||||
*
|
*
|
||||||
* Parameters
|
* Parameters
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
* bounds - {<OpenLayers.Bounds>}
|
||||||
@@ -641,7 +639,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
* {<OpenLayers.Tile>} The added OpenLayers.Tile
|
* {<OpenLayers.Tile>} The added OpenLayers.Tile
|
||||||
*/
|
*/
|
||||||
addTile:function(bounds, position) {
|
addTile:function(bounds, position) {
|
||||||
// Should be implemented by subclasses
|
return new OpenLayers.Tile.Image(this, position, bounds, null,
|
||||||
|
this.tileSize, this.tileOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -94,22 +94,6 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>}
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
var url = this.getURL(bounds);
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
url, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: calculateGridLayout
|
* Method: calculateGridLayout
|
||||||
* ka-Map uses the center point of the map as an origin for
|
* ka-Map uses the center point of the map as an origin for
|
||||||
|
|||||||
@@ -233,22 +233,6 @@ OpenLayers.Layer.MapGuide = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* Creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: getURL
|
* Method: getURL
|
||||||
* Return a query string for this layer
|
* Return a query string for this layer
|
||||||
|
|||||||
@@ -77,22 +77,6 @@ OpenLayers.Layer.MapServer = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* Creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: getURL
|
* Method: getURL
|
||||||
* Return a query string for this layer
|
* Return a query string for this layer
|
||||||
|
|||||||
@@ -131,22 +131,6 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return url + path;
|
return url + path;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: setMap
|
* APIMethod: setMap
|
||||||
* When the layer is added to a map, then we can fetch our origin
|
* When the layer is added to a map, then we can fetch our origin
|
||||||
|
|||||||
@@ -145,22 +145,5 @@ OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return url + path;
|
return url + path;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* Create a tile, initialize it, and add it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<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);
|
|
||||||
},
|
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Layer.TileCache"
|
CLASS_NAME: "OpenLayers.Layer.TileCache"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -202,22 +202,6 @@ OpenLayers.Layer.WMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return requestString;
|
return requestString;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize, this.tileOptions);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: mergeNewParams
|
* APIMethod: mergeNewParams
|
||||||
* Catch changeParams and uppercase the new params to be merged in
|
* Catch changeParams and uppercase the new params to be merged in
|
||||||
|
|||||||
@@ -456,21 +456,5 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* Create a tile, initialize it, and add it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile: function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Layer.WMTS"
|
CLASS_NAME: "OpenLayers.Layer.WMTS"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -59,20 +59,6 @@ OpenLayers.Layer.WorldWind = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
this.params, this.DEFAULT_PARAMS
|
this.params, this.DEFAULT_PARAMS
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: getZoom
|
* Method: getZoom
|
||||||
|
|||||||
@@ -151,22 +151,6 @@ OpenLayers.Layer.XYZ = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
return {'x': x, 'y': y, 'z': z};
|
return {'x': x, 'y': y, 'z': z};
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/* APIMethod: setMap
|
/* APIMethod: setMap
|
||||||
* When the layer is added to a map, then we can fetch our origin
|
* When the layer is added to a map, then we can fetch our origin
|
||||||
* (if we don't have one.)
|
* (if we don't have one.)
|
||||||
|
|||||||
@@ -238,22 +238,6 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: addTile
|
|
||||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* bounds - {<OpenLayers.Bounds>}
|
|
||||||
* position - {<OpenLayers.Pixel>}
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
|
|
||||||
*/
|
|
||||||
addTile:function(bounds,position) {
|
|
||||||
return new OpenLayers.Tile.Image(this, position, bounds,
|
|
||||||
null, this.tileSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIMethod: setMap
|
* APIMethod: setMap
|
||||||
* When the layer is added to a map, then we can fetch our origin
|
* When the layer is added to a map, then we can fetch our origin
|
||||||
|
|||||||
Reference in New Issue
Block a user