diff --git a/assets/default-placeholder.png b/assets/default-placeholder.png new file mode 100644 index 00000000..de4079ef Binary files /dev/null and b/assets/default-placeholder.png differ diff --git a/assets/default-placeholder@2x.png b/assets/default-placeholder@2x.png new file mode 100644 index 00000000..a52d3513 Binary files /dev/null and b/assets/default-placeholder@2x.png differ diff --git a/config/environments/development.js.example b/config/environments/development.js.example index e28c51e6..2c391dd1 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -94,7 +94,13 @@ var config = { proxy: undefined, // the url for a proxy server whitelist: [ // the whitelist of urlTemplates that can be used 'http://{s}.example.com/{z}/{x}/{y}.png' - ] + ], + // image to use as placeholder when urlTemplate is not in the whitelist + // if provided the http renderer will use it instead of throw an error + fallbackImage: { + type: 'fs', // 'fs' and 'url' supported + src: __dirname + '/../../assets/default-placeholder.png' + } } } ,millstone: { diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 6c4ea756..0d4e999a 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -88,7 +88,13 @@ var config = { proxy: undefined, // the url for a proxy server whitelist: [ // the whitelist of urlTemplates that can be used 'http://{s}.example.com/{z}/{x}/{y}.png' - ] + ], + // image to use as placeholder when urlTemplate is not in the whitelist + // if provided the http renderer will use it instead of throw an error + fallbackImage: { + type: 'fs', // 'fs' and 'url' supported + src: __dirname + '/../../assets/default-placeholder.png' + } } } ,millstone: { diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index f8da00db..0c88a9c7 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -88,7 +88,13 @@ var config = { proxy: undefined, // the url for a proxy server whitelist: [ // the whitelist of urlTemplates that can be used 'http://{s}.example.com/{z}/{x}/{y}.png' - ] + ], + // image to use as placeholder when urlTemplate is not in the whitelist + // if provided the http renderer will use it instead of throw an error + fallbackImage: { + type: 'fs', // 'fs' and 'url' supported + src: __dirname + '/../../assets/default-placeholder.png' + } } } ,millstone: { diff --git a/config/environments/test.js.example b/config/environments/test.js.example index 39bf1d15..14b78f61 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -90,7 +90,13 @@ var config = { 'http://{s}.example.com/{z}/{x}/{y}.png', // for testing purposes 'http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png' - ] + ], + // image to use as placeholder when urlTemplate is not in the whitelist + // if provided the http renderer will use it instead of throw an error + fallbackImage: { + type: 'fs', // 'fs' and 'url' supported + src: __dirname + '/../../assets/default-placeholder.png' + } } } ,millstone: {