Adjust editor-imagery-index blacklist/whitelist

re: https://github.com/osmlab/editor-imagery-index/pull/124
This commit is contained in:
Bryan Housel
2016-01-19 22:55:47 -05:00
parent ec51fa6a88
commit aaaf830825

View File

@@ -2,54 +2,45 @@ var fs = require('fs');
var sources = require('editor-imagery-index/imagery.json');
var imagery = [];
// CENSORSHIP! No, these are just layers that essentially duplicate other layers
// or which have no clear use case.
var censor = {
"2u": true,
"Hike & Bike": true,
"OpenCycleMap": true,
"OpenStreetMap (German Language)": true,
"OpenStreetMap (German Style)": true,
"OpenStreetMap (Sorbian Language)": true,
"MapQuest OSM": true,
"OpenStreetMap (Mapnik Black & White)": true,
"Skobbler": true,
"Stadtplan Z\u00fcrich": true, // https://github.com/osmlab/editor-imagery-index/issues/14
"Public Transport (\u00d6PNV)": true, // https://github.com/osmlab/editor-imagery-index/issues/15
"TIGER 2012 Roads Overlay": true, // https://github.com/openstreetmap/iD/pull/2010,
"Waymarked Trails: Cycling": true,
"Waymarked Trails: Hiking": true,
"Waymarked Trails: MTB": true,
"Waymarked Trails: Skating": true,
"Waymarked Trails: Winter Sports": true,
"OSM Inspector: Geometry": true,
"OSM Inspector: Highways": true,
"OSM Inspector: Multipolygon": true,
"OSM Inspector: Places": true,
"OSM Inspector: Tagging": true,
"OSM Inspector: Addresses (EU)": true,
"OSM Inspector: Boundaries (EU)": true,
"OSM Inspector: Routing (EU)": true,
"QA No Address": true
var blacklist = {
"TIGER 2012 Roads Overlay": true
};
var whitelist = [{
"name": "Locator Overlay",
"url": "http://{switch:a,b,c}.tiles.mapbox.com/v4/openstreetmap.map-inh76ba2/{zoom}/{x}/{y}.png?access_token=pk.eyJ1Ijoib3BlbnN0cmVldG1hcCIsImEiOiJncjlmd0t3In0.DmZsIeOW-3x-C5eX-wAqTw",
"description": "Shows major features to help orient you.",
"overlay": true,
"default": true,
"extent": { "max_zoom": 16 },
"type": "tms",
"attribution": {
"url": "http://www.mapbox.com/about/maps/",
"text": "Terms & Feedback"
}
},{
"id": "MAPNIK",
"name": "OpenStreetMap (Standard)",
"url": "http://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png",
"description": "The default OpenStreetMap layer.",
"default": true,
"extent": { "max_zoom": 19 },
"type": "tms",
"attribution": {
"url": "http://openstreetmap.org/",
"text": "\u00a9 OpenStreetMap contributors, CC-BY-SA"
}
}];
var descriptions = {
'Mapbox Satellite': 'Satellite and aerial imagery.',
'OpenStreetMap (Mapnik)': 'The default OpenStreetMap layer.',
'TIGER 2012 Roads Overlay': 'Public domain road data from the US Government.',
'Bing aerial imagery': 'Satellite and aerial imagery.',
'NAIP': 'National Agriculture Imagery Program'
'Bing aerial imagery': 'Satellite and aerial imagery.'
};
sources.forEach(function(source) {
sources.concat(whitelist).forEach(function(source) {
if (source.type !== 'tms' && source.type !== 'bing')
return;
if (source.name in censor)
if (source.name in blacklist)
return;
var im = {