Allow custom tileGrid in ol.source.XYZ

This commit is contained in:
Petr Sloup
2015-06-19 19:44:09 +02:00
parent 5c5364bbb7
commit 5993b45c63
3 changed files with 23 additions and 5 deletions

View File

@@ -5,6 +5,14 @@ describe('ol.source.XYZ', function() {
describe('constructor', function() {
it('can be constructed with a custom tile grid', function() {
var tileGrid = ol.tilegrid.createXYZ();
var tileSource = new ol.source.XYZ({
tileGrid: tileGrid
});
expect(tileSource.getTileGrid()).to.be(tileGrid);
});
it('can be constructed with a custom tile size', function() {
var tileSource = new ol.source.XYZ({
tileSize: 512