Merge all changes from the naturaldocs sandbox. This brings all the work that
has been done in the NaturalDocs branch back to trunk. Thanks to everyone who helped out in making this happen. (I could list people, but the list would be long, and I'm already mentally on vacation.) git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,27 +4,44 @@
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Layer/Grid.js
|
||||
*
|
||||
* Class: OpenLayers.Layer.TMS
|
||||
*
|
||||
* Inherits:
|
||||
* - <OpenLayers.Layer.Grid>
|
||||
*/
|
||||
OpenLayers.Layer.TMS = OpenLayers.Class.create();
|
||||
OpenLayers.Layer.TMS.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Layer.Grid, {
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: reproject
|
||||
* {Boolean}
|
||||
*/
|
||||
reproject: false,
|
||||
|
||||
/**
|
||||
* APIProperty: isBaseLayer
|
||||
* {Boolean}
|
||||
*/
|
||||
isBaseLayer: true,
|
||||
|
||||
/**
|
||||
* APIProperty: tileOrigin
|
||||
* {<OpenLayers.Pixel>}
|
||||
*/
|
||||
tileOrigin: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} name
|
||||
* @param {String} url
|
||||
* @param {Object} params
|
||||
* @param {Object} options Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
* Constructor: OpenLayers.Layer.TMS
|
||||
*
|
||||
* Parameters:
|
||||
* name - {String}
|
||||
* url - {String}
|
||||
* params - {Object}
|
||||
* options - {Object} Hashtable of extra options to tag onto the layer
|
||||
*/
|
||||
initialize: function(name, url, options) {
|
||||
var newArguments = new Array();
|
||||
newArguments.push(name, url, {}, options);
|
||||
@@ -32,7 +49,7 @@ OpenLayers.Layer.TMS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* APIMethod:destroy
|
||||
*/
|
||||
destroy: function() {
|
||||
// for now, nothing special to do here.
|
||||
@@ -41,10 +58,13 @@ OpenLayers.Layer.TMS.prototype =
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object} obj
|
||||
* APIMethod: clone
|
||||
*
|
||||
* @returns An exact clone of this OpenLayers.Layer.TMS
|
||||
* @type OpenLayers.Layer.TMS
|
||||
* Parameters:
|
||||
* obj - {Object}
|
||||
*
|
||||
* Return:
|
||||
* {<OpenLayers.Layer.TMS>} An exact clone of this <OpenLayers.Layer.TMS>
|
||||
*/
|
||||
clone: function (obj) {
|
||||
|
||||
@@ -63,12 +83,15 @@ OpenLayers.Layer.TMS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
* Method: getUrl
|
||||
*
|
||||
* @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
|
||||
* Parameters:
|
||||
* bounds - {<OpenLayers.Bounds>}
|
||||
*
|
||||
* Return:
|
||||
* {String} A string with the layer's url and parameters and also the
|
||||
* passed-in bounds and appropriate tile size specified as
|
||||
* parameters
|
||||
*/
|
||||
getURL: function (bounds) {
|
||||
bounds = this.adjustBounds(bounds);
|
||||
@@ -85,24 +108,28 @@ OpenLayers.Layer.TMS.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* addTile creates a tile, initializes it, and
|
||||
* adds it to the layer div.
|
||||
*
|
||||
* @param {OpenLayers.Bounds} bounds
|
||||
*
|
||||
* @returns The added OpenLayers.Tile.Image
|
||||
* @type OpenLayers.Tile.Image
|
||||
*/
|
||||
* Method: addTile
|
||||
* addTile creates a tile, initializes it, and adds it to the layer div.
|
||||
*
|
||||
* Parameters:
|
||||
* bounds - {<OpenLayers.Bounds>}
|
||||
*
|
||||
* Return:
|
||||
* {<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);
|
||||
},
|
||||
|
||||
/** When the layer is added to a map, then we can fetch our origin
|
||||
* (if we don't have one.)
|
||||
/**
|
||||
* APIMethod: setMap
|
||||
* When the layer is added to a map, then we can fetch our origin
|
||||
* (if we don't have one.)
|
||||
*
|
||||
* @param {OpenLayers.Map} map
|
||||
* Parameters:
|
||||
* map - {<OpenLayers.Map>}
|
||||
*/
|
||||
setMap: function(map) {
|
||||
OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);
|
||||
@@ -112,7 +139,6 @@ OpenLayers.Layer.TMS.prototype =
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Layer.TMS"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user