Use description from imagery index when present

This commit is contained in:
John Firebaugh
2013-10-17 14:19:21 -04:00
parent a253bafe61
commit 796b0618f5
2 changed files with 40 additions and 2 deletions
+37
View File
@@ -7658,6 +7658,7 @@
{
"name": "Locator Overlay",
"type": "tms",
"description": "Shows major features to help orient you.",
"template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/openstreetmap.map-btyhiati/{zoom}/{x}/{y}.png",
"scaleExtent": [
0,
@@ -7687,6 +7688,41 @@
"template": "http://oatile{switch:1,2,3,4}.mqcdn.com/tiles/1.0.0/sat/{zoom}/{x}/{y}.png",
"default": true
},
{
"name": "NLS - Bartholomew Half Inch, 1897-1907",
"type": "tms",
"template": "http://geo.nls.uk/mapdata2/bartholomew/great_britain/{zoom}/{x}/{-y}.png",
"scaleExtent": [
0,
15
],
"polygon": [
[
[
-9,
49.8
],
[
-9,
61.1
],
[
1.9,
61.1
],
[
1.9,
49.8
],
[
-9,
49.8
]
]
],
"terms_url": "http://geo.nls.uk/maps/",
"terms_text": "National Library of Scotland Historic Maps"
},
{
"name": "NLS - OS 1-inch 7th Series 1955-61",
"type": "tms",
@@ -13915,6 +13951,7 @@
{
"name": "OpenStreetMap GPS traces",
"type": "tms",
"description": "Public GPS traces uploaded to OpenStreetMap.",
"template": "http://{switch:a,b,c}.gps-tile.openstreetmap.org/lines/{zoom}/{x}/{y}.png",
"scaleExtent": [
0,
+3 -2
View File
@@ -19,7 +19,7 @@ var censor = {
"Public Transport (\u00d6PNV)": true // https://github.com/osmlab/editor-imagery-index/issues/15
};
var description = {
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.',
@@ -38,7 +38,8 @@ sources.forEach(function(source) {
type: source.type
};
if (description[im.name]) im.description = description[im.name];
var description = source.description || descriptions[im.name];
if (description) im.description = description;
im.template = source.url;