Remove more unreliable or slow layers, select the right layer initially,

fix null tooltips
This commit is contained in:
Tom MacWright
2013-02-06 17:16:00 -05:00
parent 3ada0f4080
commit e868c071ac
6 changed files with 44 additions and 135 deletions
+6
View File
@@ -186,6 +186,8 @@ ul.toggle-list li a {
border-top: 1px solid white;
display:block;
border-top: 1px solid rgba(0, 0, 0, .5);
text-wrap:no-wrap;
overflow:hidden;
}
ul.toggle-list li a:hover { background-color: #ececec;}
@@ -687,6 +689,10 @@ a.selected:hover .toggle.icon { background-position: -40px -180px;}
top:190px;
}
.layerswitcher-control .map-overlay {
width:250px;
}
.nudge-container {
margin-top: 10px;
}
+11 -66
View File
@@ -42,55 +42,8 @@ iD.data.imagery = [
]
},
{
"name": "OSM - Tiger Edited Map",
"template": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png",
"extent": [
[
-124.81,
24.055
],
[
-66.865,
49.386
]
]
},
{
"name": "OSM - Tiger Edited Map",
"template": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png",
"extent": [
[
-179.754,
50.858
],
[
-129.899,
71.463
]
]
},
{
"name": "OSM - Tiger Edited Map",
"template": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png",
"extent": [
[
-174.46,
18.702
],
[
-154.516,
26.501
]
]
},
{
"name": "OSM US TIGER 2012 Roads Overlay",
"name": " TIGER 2012 Roads Overlay",
"template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
"description": "Public domain road data from the US Government.",
"scaleExtent": [
0,
17
],
"subdomains": [
"a",
"b",
@@ -108,13 +61,8 @@ iD.data.imagery = [
]
},
{
"name": "OSM US TIGER 2012 Roads Overlay",
"name": " TIGER 2012 Roads Overlay",
"template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
"description": "Public domain road data from the US Government.",
"scaleExtent": [
0,
17
],
"subdomains": [
"a",
"b",
@@ -132,13 +80,8 @@ iD.data.imagery = [
]
},
{
"name": "OSM US TIGER 2012 Roads Overlay",
"name": " TIGER 2012 Roads Overlay",
"template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
"description": "Public domain road data from the US Government.",
"scaleExtent": [
0,
17
],
"subdomains": [
"a",
"b",
@@ -156,7 +99,7 @@ iD.data.imagery = [
]
},
{
"name": "OSM US USGS Topographic Maps",
"name": " USGS Topographic Maps",
"template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
"subdomains": [
"a",
@@ -175,7 +118,7 @@ iD.data.imagery = [
]
},
{
"name": "OSM US USGS Topographic Maps",
"name": " USGS Topographic Maps",
"template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
"subdomains": [
"a",
@@ -194,7 +137,7 @@ iD.data.imagery = [
]
},
{
"name": "OSM US USGS Topographic Maps",
"name": " USGS Topographic Maps",
"template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
"subdomains": [
"a",
@@ -213,7 +156,7 @@ iD.data.imagery = [
]
},
{
"name": "OSM US USGS Large Scale Aerial Imagery",
"name": " USGS Large Scale Aerial Imagery",
"template": "http://{t}.tile.openstreetmap.us/usgs_large_scale/{z}/{x}/{y}.jpg",
"subdomains": [
"a",
@@ -453,8 +396,9 @@ iD.data.imagery = [
"sourcetag": "Haiti streetnames"
},
{
"name": "National Agriculture Imagery Program",
"name": "NAIP",
"template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png",
"description": "National Agriculture Imagery Program",
"extent": [
[
-125.8,
@@ -468,8 +412,9 @@ iD.data.imagery = [
"sourcetag": "NAIP"
},
{
"name": "National Agriculture Imagery Program",
"name": "NAIP",
"template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png",
"description": "National Agriculture Imagery Program",
"extent": [
[
-168.5,
+11 -66
View File
@@ -42,55 +42,8 @@
]
},
{
"name": "OSM - Tiger Edited Map",
"template": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png",
"extent": [
[
-124.81,
24.055
],
[
-66.865,
49.386
]
]
},
{
"name": "OSM - Tiger Edited Map",
"template": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png",
"extent": [
[
-179.754,
50.858
],
[
-129.899,
71.463
]
]
},
{
"name": "OSM - Tiger Edited Map",
"template": "http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/{z}/{x}/{y}.png",
"extent": [
[
-174.46,
18.702
],
[
-154.516,
26.501
]
]
},
{
"name": "OSM US TIGER 2012 Roads Overlay",
"name": " TIGER 2012 Roads Overlay",
"template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
"description": "Public domain road data from the US Government.",
"scaleExtent": [
0,
17
],
"subdomains": [
"a",
"b",
@@ -108,13 +61,8 @@
]
},
{
"name": "OSM US TIGER 2012 Roads Overlay",
"name": " TIGER 2012 Roads Overlay",
"template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
"description": "Public domain road data from the US Government.",
"scaleExtent": [
0,
17
],
"subdomains": [
"a",
"b",
@@ -132,13 +80,8 @@
]
},
{
"name": "OSM US TIGER 2012 Roads Overlay",
"name": " TIGER 2012 Roads Overlay",
"template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png",
"description": "Public domain road data from the US Government.",
"scaleExtent": [
0,
17
],
"subdomains": [
"a",
"b",
@@ -156,7 +99,7 @@
]
},
{
"name": "OSM US USGS Topographic Maps",
"name": " USGS Topographic Maps",
"template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
"subdomains": [
"a",
@@ -175,7 +118,7 @@
]
},
{
"name": "OSM US USGS Topographic Maps",
"name": " USGS Topographic Maps",
"template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
"subdomains": [
"a",
@@ -194,7 +137,7 @@
]
},
{
"name": "OSM US USGS Topographic Maps",
"name": " USGS Topographic Maps",
"template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png",
"subdomains": [
"a",
@@ -213,7 +156,7 @@
]
},
{
"name": "OSM US USGS Large Scale Aerial Imagery",
"name": " USGS Large Scale Aerial Imagery",
"template": "http://{t}.tile.openstreetmap.us/usgs_large_scale/{z}/{x}/{y}.jpg",
"subdomains": [
"a",
@@ -453,8 +396,9 @@
"sourcetag": "Haiti streetnames"
},
{
"name": "National Agriculture Imagery Program",
"name": "NAIP",
"template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png",
"description": "National Agriculture Imagery Program",
"extent": [
[
-125.8,
@@ -468,8 +412,9 @@
"sourcetag": "NAIP"
},
{
"name": "National Agriculture Imagery Program",
"name": "NAIP",
"template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png",
"description": "National Agriculture Imagery Program",
"extent": [
[
-168.5,
+8 -2
View File
@@ -14,14 +14,16 @@ var censor = {
};
var replace = {
'OSM - Mapnik': 'OpenStreetMap'
'OSM - Mapnik': 'OpenStreetMap',
'National Agriculture Imagery Program': 'NAIP'
};
var description = {
'MapBox Satellite': 'Satellite and aerial imagery',
'OpenStreetMap': 'The default OpenStreetMap layer.',
'OSM US TIGER 2012 Roads Overlay': 'Public domain road data from the US Government.',
'Bing aerial imagery': 'Satellite imagery.'
'Bing aerial imagery': 'Satellite imagery.',
'NAIP': 'National Agriculture Imagery Program'
};
var scaleExtent = {
@@ -39,8 +41,12 @@ $('set').each(function(i) {
template: $(this).find('url').first().text()
};
// no luck with mapquest servers currently...
if (im.template.match(/mapquest/g)) return;
if (censor[im.name]) return;
im.name = im.name.replace('OSM US', '');
if (replace[im.name]) im.name = replace[im.name];
if (description[im.name]) im.description = description[im.name];
+1
View File
@@ -4,6 +4,7 @@ iD.layers.push((function() {
function custom() {
var template = window.prompt('Enter a tile template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.');
if (!template) return null;
if (template.match(/google/g)) return null;
return iD.BackgroundSource.template({
template: template,
name: 'Custom (customized)'
+7 -1
View File
@@ -122,10 +122,16 @@ iD.ui.layerswitcher = function(context) {
.text(function(d) {
return d.data.name;
})
.call(bootstrap.tooltip().placement('right'))
.each(function(d) {
// only set tooltips for layers with tooltips
if (d.data.description) {
d3.select(this).call(bootstrap.tooltip().placement('right'));
}
})
.on('click.set-source', clickSetSource)
.insert('span')
.attr('class','icon toggle');
selectLayer(context.background().source());
}
context.map().on('move.layerswitcher-update', _.debounce(update, 1000));