mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
+3
-2467
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,10 @@ var fs = require('fs');
|
||||
var sources = require('editor-layer-index/imagery.json');
|
||||
var imagery = [];
|
||||
|
||||
// ignore imagery more than 20 years old..
|
||||
var cutoffDate = new Date();
|
||||
cutoffDate.setFullYear(cutoffDate.getFullYear() - 20);
|
||||
|
||||
var blacklist = {
|
||||
"2u": true,
|
||||
"Hike & Bike": true,
|
||||
@@ -49,6 +53,12 @@ sources.concat(whitelist).forEach(function(source) {
|
||||
if (source.type !== 'tms' && source.type !== 'bing') return;
|
||||
if (source.name in blacklist) return;
|
||||
|
||||
if (source.end_date) {
|
||||
var endDate = new Date(source.end_date),
|
||||
isValid = !isNaN(endDate.getTime());
|
||||
if (isValid && endDate <= cutoffDate) return;
|
||||
}
|
||||
|
||||
var im = {
|
||||
name: source.name,
|
||||
type: source.type
|
||||
|
||||
Reference in New Issue
Block a user