From dc4df928ed1b1fb790d304ceb8eaf98f77a916ed Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 3 Mar 2012 17:28:55 -0700 Subject: [PATCH] Doc cleanup for UTFGrid layer. --- lib/OpenLayers/Layer/UTFGrid.js | 47 ++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/lib/OpenLayers/Layer/UTFGrid.js b/lib/OpenLayers/Layer/UTFGrid.js index 36bb03319e..3f121e7e89 100644 --- a/lib/OpenLayers/Layer/UTFGrid.js +++ b/lib/OpenLayers/Layer/UTFGrid.js @@ -85,7 +85,8 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, { serverResolutions: null, /** - * APIProperty: useJSONP + * Property: useJSONP + * {Boolean} * Should we use a JSONP script approach instead of a standard AJAX call? * * Set to true for using utfgrids from another server. @@ -94,9 +95,32 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, { * the callback GET parameter and dynamically * wraps the returned json in a function call. * - * {Boolean} Default is false + * Default is false */ useJSONP: false, + + /** + * APIProperty: url + * {String} + * URL tempate for UTFGrid tiles. Include x, y, and z parameters. + * E.g. "/tiles/${z}/${x}/${y}.json" + */ + + /** + * APIProperty: utfgridResolution + * {Number} + * Ratio of the pixel width to the width of a UTFGrid data point. If an + * entry in the grid represents a 4x4 block of pixels, the + * utfgridResolution would be 4. Default is 2 (specified in + * ). + */ + + /** + * Property: tileClass + * {} The tile class to use for this layer. + * Defaults is . + */ + tileClass: OpenLayers.Tile.UTFGrid, /** * Constructor: OpenLayers.Layer.UTFGrid @@ -159,16 +183,6 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, { return OpenLayers.String.format(url, xyz); }, - - - /** - * APIProperty: utfgridResolution - * {Number} - * Ratio of the pixel width to the width of a UTFGrid data point. If an - * entry in the grid represents a 4x4 block of pixels, the - * utfgridResolution would be 4. Default is 2 (specified in - * ). - */ /** * Method: getTileInfo @@ -281,12 +295,6 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, { return id; }, - /** - * APIProperty: tileClass - * {} The tile class to use for this layer. - * Defaults is OpenLayers.Tile.UTFGrid (not Tile.Image) - */ - tileClass: OpenLayers.Tile.UTFGrid, /** * Method: getXYZ @@ -319,7 +327,8 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.Grid, { return {'x': x, 'y': y, 'z': z}; }, - /* APIMethod: setMap + /** + * Method: setMap * When the layer is added to a map, then we can fetch our origin * (if we don't have one.) *