diff --git a/data/imagery.json b/data/imagery.json index be08e1ec9..5f6e14d33 100644 --- a/data/imagery.json +++ b/data/imagery.json @@ -61,7 +61,7 @@ "b", "c" ], - "extent": [ + "extents": [[ [ -124.81, 24.055 @@ -70,22 +70,7 @@ -66.865, 49.386 ] - ] - }, - { - "name": "TIGER 2012 Roads Overlay", - "template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png", - "overlay": true, - "scaleExtent": [ - 16, - 19 - ], - "subdomains": [ - "a", - "b", - "c" - ], - "extent": [ + ],[ [ -179.754, 50.858 @@ -94,22 +79,7 @@ -129.899, 71.463 ] - ] - }, - { - "name": "TIGER 2012 Roads Overlay", - "template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png", - "overlay": true, - "scaleExtent": [ - 16, - 19 - ], - "subdomains": [ - "a", - "b", - "c" - ], - "extent": [ + ],[ [ -174.46, 18.702 @@ -118,7 +88,7 @@ -154.516, 26.501 ] - ] + ]] }, { "name": "USGS Topographic Maps", @@ -128,7 +98,7 @@ "b", "c" ], - "extent": [ + "extents": [[ [ -125.991, 24.005 @@ -137,17 +107,7 @@ -65.988, 50.009 ] - ] - }, - { - "name": "USGS Topographic Maps", - "template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png", - "subdomains": [ - "a", - "b", - "c" - ], - "extent": [ + ],[ [ -160.579, 18.902 @@ -156,17 +116,7 @@ -154.793, 22.508 ] - ] - }, - { - "name": "USGS Topographic Maps", - "template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png", - "subdomains": [ - "a", - "b", - "c" - ], - "extent": [ + ],[ [ -178.001, 51.255 @@ -175,7 +125,7 @@ -130.004, 71.999 ] - ] + ]] }, { "name": "USGS Large Scale Aerial Imagery", @@ -185,7 +135,7 @@ "b", "c" ], - "extent": [ + "extents": [[ [ -124.819, 24.496 @@ -194,7 +144,7 @@ -66.931, 49.443 ] - ] + ]] }, { "name": "British Columbia bc_mosaic", @@ -205,7 +155,7 @@ "c", "d" ], - "extent": [ + "extents": [[ [ -123.441, 48.995 @@ -214,14 +164,14 @@ -121.346, 50.426 ] - ], + ]], "sourcetag": "bc_mosaic", "terms_url": "http://imagery.paulnorman.ca/tiles/about.html" }, { "name": "OS OpenData Streetview", "template": "http://os.openstreetmap.org/sv/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -8.72, 49.86 @@ -230,13 +180,13 @@ 1.84, 60.92 ] - ], + ]], "sourcetag": "OS_OpenData_StreetView" }, { "name": "OS OpenData Locator", "template": "http://tiles.itoworld.com/os_locator/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -9, 49.8 @@ -245,13 +195,13 @@ 1.9, 61.1 ] - ], + ]], "sourcetag": "OS_OpenData_Locator" }, { "name": "OS 1:25k historic (OSM)", "template": "http://ooc.openstreetmap.org/os1/{z}/{x}/{y}.jpg", - "extent": [ + "extents": [[ [ -9, 49.8 @@ -260,13 +210,13 @@ 1.9, 61.1 ] - ], + ]], "sourcetag": "OS 1:25k" }, { "name": "OS 1:25k historic (NLS)", "template": "http://geo.nls.uk/mapdata2/os/25000/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -9, 49.8 @@ -275,7 +225,7 @@ 1.9, 61.1 ] - ], + ]], "sourcetag": "OS 1:25k", "logo": "icons/logo_nls70-nq8.png", "logo_url": "http://geo.nls.uk/maps/" @@ -283,7 +233,7 @@ { "name": "OS 7th Series historic (OSM)", "template": "http://ooc.openstreetmap.org/os7/{z}/{x}/{y}.jpg", - "extent": [ + "extents": [[ [ -9, 49.8 @@ -292,13 +242,13 @@ 1.9, 61.1 ] - ], + ]], "sourcetag": "OS7" }, { "name": "OS 7th Series historic (NLS)", "template": "http://geo.nls.uk/mapdata2/os/seventh/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -9, 49.8 @@ -307,7 +257,7 @@ 1.9, 61.1 ] - ], + ]], "sourcetag": "OS7", "logo": "icons/logo_nls70-nq8.png", "logo_url": "http://geo.nls.uk/maps/" @@ -315,7 +265,7 @@ { "name": "OS New Popular Edition historic", "template": "http://ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -5.8, 49.8 @@ -324,13 +274,13 @@ 1.9, 55.8 ] - ], + ]], "sourcetag": "NPE" }, { "name": "OS Scottish Popular historic", "template": "http://ooc.openstreetmap.org/npescotland/tiles/{z}/{x}/{y}.jpg", - "extent": [ + "extents": [[ [ -7.8, 54.5 @@ -339,13 +289,13 @@ -1.1, 61.1 ] - ], + ]], "sourcetag": "NPE" }, { "name": "Surrey aerial", "template": "http://gravitystorm.dev.openstreetmap.org/surrey/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -0.856, 51.071 @@ -354,13 +304,13 @@ 0.062, 51.473 ] - ], + ]], "sourcetag": "Surrey aerial" }, { "name": "Port au Prince - GeoEye Jan 2010", "template": "http://gravitystorm.dev.openstreetmap.org/imagery/haiti/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -72.43, 18.50 @@ -369,13 +319,13 @@ -72.31, 18.58 ] - ], + ]], "sourcetag": "GeoEye, 2010-01" }, { "name": "Haiti - IOM Drone Imagery, 2012-13", "template": "http://wms.openstreetmap.fr/tms/1.0.0/iomhaiti/{zoom}/{x}/{y}", - "extent": [ + "extents": [[ [ -74.5, 17.95 @@ -384,14 +334,14 @@ -71.58, 20.12 ] - ], + ]], "sourcetag": "iom_image2013" }, { "name": "NAIP", "template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png", "description": "National Agriculture Imagery Program", - "extent": [ + "extents": [[ [ -125.8, 24.2 @@ -400,14 +350,7 @@ -62.3, 49.5 ] - ], - "sourcetag": "NAIP" - }, - { - "name": "NAIP", - "template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png", - "description": "National Agriculture Imagery Program", - "extent": [ + ],[ [ -168.5, 55.3 @@ -416,13 +359,13 @@ -140, 71.5 ] - ], + ]], "sourcetag": "NAIP" }, { "name": "Ireland - NLS Historic Maps", "template": "http://geo.nls.uk/maps/ireland/gsgs4136/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ -10.71, 51.32 @@ -431,7 +374,7 @@ -5.37, 55.46 ] - ], + ]], "sourcetag": "NLS Historic Maps", "logo": "icons/logo_nls70-nq8.png", "logo_url": "http://geo.nls.uk/maps/" @@ -439,7 +382,7 @@ { "name": "Denmark - Fugro Aerial Imagery", "template": "http://tile.openstreetmap.dk/fugro2005/{z}/{x}/{y}.jpg", - "extent": [ + "extents": [[ [ 7.81, 54.44 @@ -448,13 +391,13 @@ 15.49, 57.86 ] - ], + ]], "sourcetag": "Fugro (2005)" }, { "name": "Denmark - Stevns Kommune", "template": "http://tile.openstreetmap.dk/stevns/2009/{z}/{x}/{y}.jpg", - "extent": [ + "extents": [[ [ 12.09144, 55.23403 @@ -463,13 +406,13 @@ 12.47712, 55.43647 ] - ], + ]], "sourcetag": "Stevns Kommune (2009)" }, { "name": "Austria - geoimage.at", "template": "http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/{z}/{x}/{y}.jpg", - "extent": [ + "extents": [[ [ 9.36, 46.33 @@ -478,13 +421,13 @@ 17.28, 49.09 ] - ], + ]], "sourcetag": "geoimage.at" }, { "name": "Russia - Kosmosnimki.ru IRS Satellite", "template": "http://irs.gis-lab.info/?layers=irs&request=GetTile&z={z}&x={x}&y={y}", - "extent": [ + "extents": [[ [ 19.02, 40.96 @@ -493,13 +436,13 @@ 77.34, 70.48 ] - ], + ]], "sourcetag": "Kosmosnimki.ru IRS" }, { "name": "Belarus - Kosmosnimki.ru SPOT4 Satellite", "template": "http://irs.gis-lab.info/?layers=spot&request=GetTile&z={z}&x={x}&y={y}", - "extent": [ + "extents": [[ [ 23.16, 51.25 @@ -508,13 +451,13 @@ 32.83, 56.19 ] - ], + ]], "sourcetag": "Kosmosnimki.ru SPOT4" }, { "name": "Australia - Geographic Reference Image", "template": "http://agri.openstreetmap.org/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ 96, -44 @@ -523,13 +466,13 @@ 168, -9 ] - ], + ]], "sourcetag": "AGRI" }, { "name": "Switzerland - Canton Aargau - AGIS 25cm 2011", "template": "http://tiles.poole.ch/AGIS/OF2011/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ 7.69, 47.13 @@ -538,13 +481,13 @@ 8.48, 47.63 ] - ], + ]], "sourcetag": "AGIS OF2011" }, { "name": "Switzerland - Canton Solothurn - SOGIS 2007", "template": "http://mapproxy.sosm.ch:8080/tiles/sogis2007/EPSG900913/{z}/{x}/{y}.png?origin=nw", - "extent": [ + "extents": [[ [ 7.33, 47.06 @@ -553,13 +496,13 @@ 8.04, 47.5 ] - ], + ]], "sourcetag": "Orthofoto 2007 WMS Solothurn" }, { "name": "Poland - Media-Lab fleet GPS masstracks", "template": "http://masstracks.media-lab.com.pl/{z}/{x}/{y}.png", - "extent": [ + "extents": [[ [ 14, 48.9 @@ -568,7 +511,7 @@ 24.2, 55 ] - ], + ]], "sourcetag": "masstracks" }, { @@ -579,7 +522,7 @@ "b", "c" ], - "extent": [ + "extents": [[ [ 17.64, -34.95 @@ -588,13 +531,13 @@ 32.87, -22.05 ] - ], + ]], "sourcetag": "ngi-aerial" }, { "name": "Lithuania - ORT10LT", "template": "http://mapproxy.openmap.lt/ort10lt/g/{z}/{x}/{y}.jpeg", - "extent": [ + "extents": [[ [ 21, 53.88 @@ -603,7 +546,7 @@ 26.85, 56.45 ] - ], + ]], "scaleExtent": [ 4, 18 diff --git a/js/id/renderer/background.js b/js/id/renderer/background.js index 8385ee0a7..cd4139dcc 100644 --- a/js/id/renderer/background.js +++ b/js/id/renderer/background.js @@ -55,8 +55,10 @@ iD.Background = function(context) { background.sources = function(extent) { return backgroundSources.filter(function(layer) { - return !layer.data.extent || - iD.geo.Extent(layer.data.extent).intersects(extent); + return !layer.data.extents || + layer.data.extents.some(function(layerExtent) { + return iD.geo.Extent(layerExtent).intersects(extent); + }); }); };