Add None tile layer

Fixes #1472
This commit is contained in:
Aaron Lidman
2013-10-14 12:08:36 -04:00
parent b51cfd5d84
commit 1899eb361c
5 changed files with 9 additions and 0 deletions

View File

@@ -211,6 +211,7 @@ en:
title: Background
description: Background settings
percent_brightness: "{opacity}% brightness"
none: None
custom: Custom
custom_prompt: "Enter a tile template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme."
fix_misalignment: Fix misalignment

View File

@@ -260,6 +260,7 @@
"title": "Background",
"description": "Background settings",
"percent_brightness": "{opacity}% brightness",
"none": "None",
"custom": "Custom",
"custom_prompt": "Enter a tile template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.",
"fix_misalignment": "Fix misalignment",

View File

@@ -14,6 +14,8 @@ iD.Background = function(context) {
}
});
backgroundSources.unshift(iD.BackgroundSource.None());
function findSource(id) {
return _.find(backgroundSources, function(d) {
return d.id && d.id === id;

View File

@@ -112,3 +112,7 @@ iD.BackgroundSource.Bing = function(data, dispatch) {
return bing;
};
iD.BackgroundSource.None = function() {
return iD.BackgroundSource({ name: t('background.none'), id: 'None', template: '' });
};

View File

@@ -68,6 +68,7 @@ iD.TileLayer = function() {
if (source.validZoom(z)) {
tile().forEach(function(d) {
addSource(d);
if (d[3] === '') return;
requests.push(d);
if (cache[d[3]] === false && lookUp(d)) {
requests.push(addSource(lookUp(d)));