Files
iD/js/id/renderer/layers.js
2013-02-06 17:16:00 -05:00

16 lines
546 B
JavaScript

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;
})());