Allow '{-y}' placeholder

This commit is contained in:
Frederic Junod
2014-04-14 13:57:36 +02:00
parent 738fe65268
commit 9b5512c065
5 changed files with 105 additions and 6 deletions

View File

@@ -33,6 +33,10 @@ describe('ol.TileUrlFunction', function() {
expect(tileUrl(new ol.TileCoord(3, 2, 1))).to.eql('3/2/1');
expect(tileUrl(null)).to.be(undefined);
});
it('accepts {-y} placeholder', function() {
var tileUrl = ol.TileUrlFunction.createFromTemplate('{z}/{x}/{-y}');
expect(tileUrl(new ol.TileCoord(3, 2, 2))).to.eql('3/2/5');
});
});
describe('createFromTemplates', function() {