add a basic TileSet class
This commit is contained in:
@@ -5,3 +5,4 @@ goog.require("ol.loc");
|
|||||||
goog.require("ol.projection");
|
goog.require("ol.projection");
|
||||||
|
|
||||||
goog.require("ol.Tile");
|
goog.require("ol.Tile");
|
||||||
|
goog.require("ol.TileSet");
|
||||||
|
|||||||
40
src/ol/TileSet.js
Normal file
40
src/ol/TileSet.js
Normal file
@@ -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.<ol.Tile>|undefined}
|
||||||
|
*/
|
||||||
|
this.tiles_ = undefined;
|
||||||
|
};
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
<script type="text/javascript" src="spec/ol/Map.test.js"></script>
|
<script type="text/javascript" src="spec/ol/Map.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/Projection.test.js"></script>
|
<script type="text/javascript" src="spec/ol/Projection.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/Tile.test.js"></script>
|
<script type="text/javascript" src="spec/ol/Tile.test.js"></script>
|
||||||
|
<script type="text/javascript" src="spec/ol/TileSet.test.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
8
test/spec/ol/TileSet.test.js
Normal file
8
test/spec/ol/TileSet.test.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
describe("ol.TileSet", function() {
|
||||||
|
describe("creating a tileset", function() {
|
||||||
|
it("creates a tileset instance", function() {
|
||||||
|
var tileset = new ol.TileSet();
|
||||||
|
expect(tileset instanceof ol.TileSet).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user