mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 16:19:48 +02:00
Remove duplicated code
This commit is contained in:
@@ -1,15 +1,2 @@
|
||||
iD.layers = iD.data.imagery.map(iD.BackgroundSource.template);
|
||||
|
||||
iD.layers.push((function() {
|
||||
function custom() {
|
||||
var template = window.prompt('Enter a tile template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.');
|
||||
if (!template) return null;
|
||||
if (template.match(/google/g)) return null;
|
||||
return iD.BackgroundSource.template({
|
||||
template: template,
|
||||
name: 'Custom (customized)'
|
||||
});
|
||||
}
|
||||
custom.data = { name: 'Custom' };
|
||||
return custom;
|
||||
})());
|
||||
iD.layers.push(iD.BackgroundSource.Custom);
|
||||
|
||||
Reference in New Issue
Block a user