From 1c8abd38a6090378234d82addfc09affc46a9d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Jun 2012 15:18:34 +0200 Subject: [PATCH] add a basic TileSet class --- src/ol.js | 1 + src/ol/TileSet.js | 40 ++++++++++++++++++++++++++++++++++++ test/index.html | 1 + test/spec/ol/TileSet.test.js | 8 ++++++++ 4 files changed, 50 insertions(+) create mode 100644 src/ol/TileSet.js create mode 100644 test/spec/ol/TileSet.test.js diff --git a/src/ol.js b/src/ol.js index 29f3e4a655..93a9a92342 100644 --- a/src/ol.js +++ b/src/ol.js @@ -5,3 +5,4 @@ goog.require("ol.loc"); goog.require("ol.projection"); goog.require("ol.Tile"); +goog.require("ol.TileSet"); diff --git a/src/ol/TileSet.js b/src/ol/TileSet.js new file mode 100644 index 0000000000..dbe1f22ccf --- /dev/null +++ b/src/ol/TileSet.js @@ -0,0 +1,40 @@ +goog.provide('ol.TileSet'); + +/** + * The TileSet class. A TileSet instance represents a collection of + * tiles. Tiles of a TileSet have the same resolution, width and + * height. + * @constructor + */ +ol.TileSet = function() { + + /** + * @private + * @type {number|undefined} + */ + this.resolution_ = undefined; + + /** + * @private + * @type {number|undefined} + */ + this.bounds_ = undefined; + + /** + * @private + * @type {number|undefined} + */ + this.tileWidth_ = undefined; + + /** + * @private + * @type {number|undefined} + */ + this.tileHeight_ = undefined; + + /** + * @private + * @type {Array.|undefined} + */ + this.tiles_ = undefined; +}; diff --git a/test/index.html b/test/index.html index d331119af3..3f64ee9160 100644 --- a/test/index.html +++ b/test/index.html @@ -17,6 +17,7 @@ +