mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Support JOSM style templates. Fixes #1023
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user