add JSDOC commenting and stub moveTo function in WFS tile

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1147 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-09 05:42:42 +00:00
parent b262f2fb71
commit f3d6fb8718
6 changed files with 40 additions and 1 deletions
+9 -1
View File
@@ -45,7 +45,15 @@ OpenLayers.Layer.KaMap.prototype =
} }
}, },
getURL:function(bounds) { /**
* @param {OpenLayers.Bounds} bounds
*
* @returns A string with the layer's url and parameters and also the
* passed-in bounds and appropriate tile size specified as
* parameters
* @type String
*/
getURL: function (bounds) {
var zoom = this.map.getZoom(); var zoom = this.map.getZoom();
var maxRes = this.map.maxResolution; var maxRes = this.map.maxResolution;
var mapRes = this.map.getResolution(); var mapRes = this.map.getResolution();
+8
View File
@@ -84,6 +84,14 @@ OpenLayers.Layer.WMS.prototype =
return obj; return obj;
}, },
/**
* @param {OpenLayers.Bounds} bounds
*
* @returns A string with the layer's url and parameters and also the
* passed-in bounds and appropriate tile size specified as
* parameters
* @type String
*/
getURL: function (bounds) { getURL: function (bounds) {
return this.getFullRequestString( return this.getFullRequestString(
{BBOX:bounds.toBBOX(), {BBOX:bounds.toBBOX(),
+8
View File
@@ -60,6 +60,14 @@ OpenLayers.Layer.WorldWind.prototype =
return zoom; return zoom;
}, },
/**
* @param {OpenLayers.Bounds} bounds
*
* @returns A string with the layer's url and parameters and also the
* passed-in bounds and appropriate tile size specified as
* parameters
* @type String
*/
getURL: function (bounds) { getURL: function (bounds) {
var deg = this.lzd/Math.pow(2,this.getZoom()); var deg = this.lzd/Math.pow(2,this.getZoom());
var x = Math.floor((bounds.left - extent.left)/deg); var x = Math.floor((bounds.left - extent.left)/deg);
+4
View File
@@ -71,6 +71,10 @@ OpenLayers.Tile.prototype = {
this.draw(); this.draw();
}, },
/**
* @param {OpenLayers.Bounds}
* @param {OpenLayers.pixel} position
*/
moveTo: function (bounds, position) { moveTo: function (bounds, position) {
this.bounds = bounds.clone(); this.bounds = bounds.clone();
this.position = position.clone(); this.position = position.clone();
+4
View File
@@ -57,6 +57,10 @@ OpenLayers.Tile.Image.prototype =
this.layer.div.appendChild(this.imgDiv); this.layer.div.appendChild(this.imgDiv);
}, },
/**
* @param {OpenLayers.Bounds}
* @param {OpenLayers.pixel} position
*/
moveTo: function (bounds, position) { moveTo: function (bounds, position) {
this.url = this.layer.getURL(bounds); this.url = this.layer.getURL(bounds);
OpenLayers.Tile.prototype.moveTo.apply(this, arguments); OpenLayers.Tile.prototype.moveTo.apply(this, arguments);
+7
View File
@@ -49,6 +49,13 @@ OpenLayers.Tile.WFS.prototype =
this.loadFeaturesForRegion(this.requestSuccess); this.loadFeaturesForRegion(this.requestSuccess);
}, },
/**
* @param {OpenLayers.Bounds}
* @param {OpenLayers.pixel} position
*/
moveTo: function (bounds, position) {
OpenLayers.Tile.prototype.moveTo.apply(this, arguments);
},
/** get the full request string from the ds and the tile params /** get the full request string from the ds and the tile params
* and call the AJAX loadURL(). * and call the AJAX loadURL().