add an ol.layer.xyz factory

This commit is contained in:
Éric Lemoine
2012-06-20 18:08:51 +02:00
parent 958e291545
commit 7413770a46
4 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
describe('ol.layer.xyz', function() {
it("doesn't allow empty construction", function() {
expect(function() {
// nowhere
var layer = ol.layer.xyz();
}).toThrow();
});
it("creates an ol.layer.XYZ instance", function() {
var layer = ol.layer.xyz({url: 'http://foo/{x}/{y}/{z}'});
expect(layer).toBeA(ol.layer.XYZ);
});
});