pass the position in as parameter on new tile creation. remove unnecessary setPosition() function, as tiles no longer really get moved. they get drawn in their div and then the div moves around. no need to make that any more complicated. update tests for that. Also, finish renaming 'grid' to 'layer' (from r369).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@390 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -30,15 +30,17 @@ OpenLayers.Tile.prototype = {
|
||||
* @constructor
|
||||
*
|
||||
* @param {OpenLayers.Layer} layer
|
||||
* @param {OpenLayers.Pixel} position
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* @param {String} url
|
||||
* @param {OpenLayers.Size} size
|
||||
*/
|
||||
initialize: function(layer, bounds, url, size) {
|
||||
initialize: function(layer, position, bounds, url, size) {
|
||||
if (arguments.length > 0) {
|
||||
this.layer = layer;
|
||||
this.url = url;
|
||||
this.position = position;
|
||||
this.bounds = bounds;
|
||||
this.url = url;
|
||||
this.size = size;
|
||||
}
|
||||
},
|
||||
@@ -67,15 +69,6 @@ OpenLayers.Tile.prototype = {
|
||||
remove:function() {
|
||||
},
|
||||
|
||||
/** This should be overridden by subclasses if they have special needs
|
||||
*
|
||||
* @param OpenLayers.Pixel
|
||||
*/
|
||||
setPosition:function(pixel) {
|
||||
this.position = pixel;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user