Support JOSM style templates. Fixes #1023

This commit is contained in:
Tom MacWright
2013-03-15 16:22:54 -04:00
parent b665770bf1
commit 53121c9842
2 changed files with 11 additions and 2 deletions
+4 -1
View File
@@ -39,6 +39,9 @@ describe('iD.Background', function() {
var source = iD.BackgroundSource.template({ template: '{t}/{z}/{x}/{y}', subdomains: ['apples', 'oranges'] });
expect(source([0,1,1])).to.equal('oranges/1/0/1');
});
it('supports josm style templates', function() {
var source = iD.BackgroundSource.template({ template: '{switch:foo,bar}/{zoom}/{x}/{y}' });
expect(source([0,1,1])).to.equal('bar/1/0/1');
});
});
});