[OpenLayers-Commits] r11575 - trunk/openlayers/lib/OpenLayers/Layer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Mon Feb 28 03:12:07 EST 2011
Author: fredj
Date: 2011-02-28 00:12:05 -0800 (Mon, 28 Feb 2011)
New Revision: 11575
Modified:
trunk/openlayers/lib/OpenLayers/Layer/ArcGIS93Rest.js
trunk/openlayers/lib/OpenLayers/Layer/ArcIMS.js
trunk/openlayers/lib/OpenLayers/Layer/Grid.js
trunk/openlayers/lib/OpenLayers/Layer/KaMap.js
trunk/openlayers/lib/OpenLayers/Layer/MapGuide.js
trunk/openlayers/lib/OpenLayers/Layer/MapServer.js
trunk/openlayers/lib/OpenLayers/Layer/TMS.js
trunk/openlayers/lib/OpenLayers/Layer/TileCache.js
trunk/openlayers/lib/OpenLayers/Layer/WMS.js
trunk/openlayers/lib/OpenLayers/Layer/WMTS.js
trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js
trunk/openlayers/lib/OpenLayers/Layer/XYZ.js
trunk/openlayers/lib/OpenLayers/Layer/Zoomify.js
Log:
move addTile code to the base class (OpenLayers.Layer.Grid). r=crschmidt (closes #2904)
Modified: trunk/openlayers/lib/OpenLayers/Layer/ArcGIS93Rest.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/ArcGIS93Rest.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/ArcGIS93Rest.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -232,22 +232,5 @@
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"
});
Modified: trunk/openlayers/lib/OpenLayers/Layer/ArcIMS.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/ArcIMS.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/ArcIMS.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -445,22 +445,5 @@
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"
});
Modified: trunk/openlayers/lib/OpenLayers/Layer/Grid.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/Grid.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/Grid.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -629,9 +629,7 @@
/**
* APIMethod: addTile
- * Gives subclasses of Grid the opportunity to create an
- * OpenLayer.Tile of their choosing. The implementer should initialize
- * the new tile and take whatever steps necessary to display it.
+ * Create a tile, initialize it, and add it to the layer div.
*
* Parameters
* bounds - {<OpenLayers.Bounds>}
@@ -641,7 +639,8 @@
* {<OpenLayers.Tile>} The added OpenLayers.Tile
*/
addTile:function(bounds, position) {
- // Should be implemented by subclasses
+ return new OpenLayers.Tile.Image(this, position, bounds, null,
+ this.tileSize, this.tileOptions);
},
/**
Modified: trunk/openlayers/lib/OpenLayers/Layer/KaMap.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/KaMap.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/KaMap.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -94,22 +94,6 @@
});
},
- /**
- * 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
* ka-Map uses the center point of the map as an origin for
Modified: trunk/openlayers/lib/OpenLayers/Layer/MapGuide.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/MapGuide.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/MapGuide.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -234,22 +234,6 @@
},
/**
- * 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
* Return a query string for this layer
*
Modified: trunk/openlayers/lib/OpenLayers/Layer/MapServer.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/MapServer.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/MapServer.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -76,22 +76,6 @@
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
Modified: trunk/openlayers/lib/OpenLayers/Layer/TMS.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/TMS.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/TMS.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -131,22 +131,6 @@
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
* When the layer is added to a map, then we can fetch our origin
Modified: trunk/openlayers/lib/OpenLayers/Layer/TileCache.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/TileCache.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/TileCache.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -144,23 +144,6 @@
url = (url.charAt(url.length - 1) == '/') ? url : url + '/';
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"
});
Modified: trunk/openlayers/lib/OpenLayers/Layer/WMS.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/WMS.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/WMS.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -203,22 +203,6 @@
},
/**
- * 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
* Catch changeParams and uppercase the new params to be merged in
* before calling changeParams on the super class.
Modified: trunk/openlayers/lib/OpenLayers/Layer/WMTS.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/WMTS.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/WMTS.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -456,21 +456,5 @@
}
},
- /**
- * 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"
});
Modified: trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -59,20 +59,6 @@
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
Modified: trunk/openlayers/lib/OpenLayers/Layer/XYZ.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/XYZ.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/XYZ.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -151,22 +151,6 @@
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
* When the layer is added to a map, then we can fetch our origin
* (if we don't have one.)
Modified: trunk/openlayers/lib/OpenLayers/Layer/Zoomify.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Layer/Zoomify.js 2011-02-28 08:10:10 UTC (rev 11574)
+++ trunk/openlayers/lib/OpenLayers/Layer/Zoomify.js 2011-02-28 08:12:05 UTC (rev 11575)
@@ -239,22 +239,6 @@
},
/**
- * 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
* When the layer is added to a map, then we can fetch our origin
* (if we don't have one.)
More information about the Commits
mailing list