Updating the TMS API docs.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12131 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2011-06-29 22:56:58 +00:00
parent eb7cc04254
commit 46899f8ba3
+57 -7
View File
@@ -11,6 +11,18 @@
/** /**
* Class: OpenLayers.Layer.TMS * Class: OpenLayers.Layer.TMS
* Create a layer for accessing tiles from services that conform with the
* Tile Map Service Specification
* (http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification).
*
* Example:
* (code)
* var layer = OpenLayers.Layer.TMS(
* "My Layer", // name for display in LayerSwitcher
* "http://tilecache.osgeo.org/wms-c/Basic.py/", // service endpoint
* {layername: "basic", type: "png"} // required properties
* );
* (end)
* *
* Inherits from: * Inherits from:
* - <OpenLayers.Layer.Grid> * - <OpenLayers.Layer.Grid>
@@ -19,13 +31,33 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
/** /**
* APIProperty: serviceVersion * APIProperty: serviceVersion
* {String} * {String} Service version for tile requests. Default is "1.0.0".
*/ */
serviceVersion: "1.0.0", serviceVersion: "1.0.0",
/**
* APIProperty: layername
* {String} The identifier for the <TileMap> as advertised by the service.
* For example, if the service advertises a <TileMap> with
* 'href="http://tms.osgeo.org/1.0.0/vmap0"', the <layername> property
* would be set to "vmap0".
*/
layername: null,
/**
* APIProperty: type
* {String} The format extension corresponding to the requested tile image
* type. This is advertised in a <TileFormat> element as the
* "extension" attribute. For example, if the service advertises a
* <TileMap> with <TileFormat width="256" height="256" mime-type="image/jpeg" extension="jpg" />,
* the <type> property would be set to "jpg".
*/
type: null,
/** /**
* APIProperty: isBaseLayer * APIProperty: isBaseLayer
* {Boolean} * {Boolean} Make this layer a base layer. Default is true. Set false to
* use the layer as an overlay.
*/ */
isBaseLayer: true, isBaseLayer: true,
@@ -36,6 +68,20 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* with this location (no tiles shall overlap this location). If * with this location (no tiles shall overlap this location). If
* not provided, the grid of tiles will be aligned with the map's * not provided, the grid of tiles will be aligned with the map's
* <maxExtent>. Default is ``null``. * <maxExtent>. Default is ``null``.
*
* Example:
* (code)
* var layer = OpenLayers.Layer.TMS(
* "My Layer",
* "http://tilecache.osgeo.org/wms-c/Basic.py/",
* {
* layername: "basic",
* type: "png",
* // set if different than the bottom left of map.maxExtent
* tileOrigin: new OpenLayers.LonLat(-180, -90)
* }
* );
* (end)
*/ */
tileOrigin: null, tileOrigin: null,
@@ -64,9 +110,11 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
* Constructor: OpenLayers.Layer.TMS * Constructor: OpenLayers.Layer.TMS
* *
* Parameters: * Parameters:
* name - {String} * name - {String} Title to be displayed in a <OpenLayers.Control.LayerSwitcher>
* url - {String} * url - {String} Service endpoint (without the version number). E.g.
* options - {Object} Hashtable of extra options to tag onto the layer * "http://tms.osgeo.org/".
* options - {Object} Additional properties to be set on the layer. The
* <layername> and <type> properties must be set here.
*/ */
initialize: function(name, url, options) { initialize: function(name, url, options) {
var newArguments = []; var newArguments = [];
@@ -85,9 +133,11 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
/** /**
* APIMethod: clone * APIMethod: clone
* Create a complete copy of this layer.
* *
* Parameters: * Parameters:
* obj - {Object} * obj - {Object} Should only be provided by subclasses that call this
* method.
* *
* Returns: * Returns:
* {<OpenLayers.Layer.TMS>} An exact clone of this <OpenLayers.Layer.TMS> * {<OpenLayers.Layer.TMS>} An exact clone of this <OpenLayers.Layer.TMS>
@@ -136,7 +186,7 @@ OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, {
}, },
/** /**
* APIMethod: setMap * Method: 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.)
* *