Changeset 9382 for src/django_gheat/wlheatmap/static/OpenStreetMap.js
- Timestamp:
- Jul 12, 2011, 9:27:44 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/static/OpenStreetMap.js
r9373 r9382 29 29 }; 30 30 31 var wl_balancers = ['a','b','c','d','e','f']; 32 function get_balanced_urls(prefix, balancers, suffix) { 33 var urls = []; 34 for (i=0 ; i < balancers.length; i++) { 35 urls.push(prefix + balancers[i] + suffix); 36 }; 37 return urls; 38 }; 39 40 31 41 /** 32 42 * Class: OpenLayers.Layer.OSM.Mapnik … … 44 54 */ 45 55 initialize: function(name, options) { 46 var url = [ 47 "http://a.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 48 "http://b.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 49 "http://c.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 50 "http://d.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 51 "http://e.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 52 "http://f.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png", 53 ]; 56 var url = get_balanced_urls('http://', wl_balancers, '.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png'); 54 57 options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options); 55 58 var newArguments = [name, url, options]; … … 165 168 OpenLayers.Layer.OSM.Overlay2 = OpenLayers.Class(OpenLayers.Layer.OSM, { 166 169 initialize: function(name, options) { 167 var url = [ 168 "http://a.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=90,90,90", 169 "http://b.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=90,90,90", 170 "http://c.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=90,90,90", 171 "http://d.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=90,90,90", 172 "http://e.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=90,90,90", 173 "http://f.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=90,90,90", 174 ]; 170 var url = get_balanced_urls('http://', wl_balancers, '.maps.wirelessleiden.nl/wlheatmap/tile/${z}/${x},${y}.png?colour=90,90,90'); 175 171 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 176 172 var newArguments = [name, url, options]; … … 186 182 OpenLayers.Layer.OSM.Overlay3 = OpenLayers.Class(OpenLayers.Layer.OSM, { 187 183 initialize: function(name, options) { 188 var url = [ 189 "http://a.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden", 190 "http://b.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden", 191 "http://c.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden", 192 "http://d.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden", 193 "http://e.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden", 194 "http://f.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden", 195 ]; 184 var url = get_balanced_urls('http://', wl_balancers, '.maps.wirelessleiden.nl/wlheatmap/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden'); 196 185 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 197 186 var newArguments = [name, url, options]; … … 207 196 OpenLayers.Layer.OSM.Overlay4 = OpenLayers.Class(OpenLayers.Layer.OSM, { 208 197 initialize: function(name, options) { 209 var url = [ 210 "http://a.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100", 211 "http://b.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100", 212 "http://c.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100", 213 "http://d.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100", 214 "http://e.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100", 215 "http://f.maps.wirelessleiden.nl/heatmap/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100", 216 ]; 198 var url = get_balanced_urls('http://', wl_balancers, '.maps.wirelessleiden.nl/wlheatmap/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=0&signaal__lte=100'); 217 199 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 218 200 var newArguments = [name, url, options];
Note:
See TracChangeset
for help on using the changeset viewer.