Changeset 9544 for src/django_gheat/wlheatmap/templates/js/LayerBase.js
- Timestamp:
- Aug 23, 2011, 10:11:58 AM (13 years ago)
- Location:
- src/django_gheat/wlheatmap/templates/js
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/templates/js/LayerBase.js
r9543 r9544 29 29 }; 30 30 31 var wl_balancers = ['a','b','c','d','e','f'];32 31 function get_balanced_urls(prefix, balancers, suffix) { 33 32 var urls = []; 34 for ( i=0; i < balancers.length; i++) {33 for (var i=0; i < balancers.length; i++) { 35 34 urls.push(prefix + balancers[i] + suffix); 36 35 }; … … 39 38 40 39 40 41 41 /** 42 42 * Class: OpenLayers.Layer.OSM.Mapnik … … 54 54 */ 55 55 initialize: function(name, options) { 56 var url = get_balanced_urls('http://', wl_balancers, '.osmproxy.wirelessleiden.nl/heatmap/osm-proxy/${z}/${x},${y}.png');56 var url = get_balanced_urls('http://', {{ settings.OSM_PROXY_CDN_DOMAINS|safe }}, '{{ settings.DJANGO_PREFIX }}/osm-proxy/${z}/${x},${y}.png'); 57 57 options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options); 58 58 var newArguments = [name, url, options]; … … 168 168 OpenLayers.Layer.OSM.Overlay2 = OpenLayers.Class(OpenLayers.Layer.OSM, { 169 169 initialize: function(name, options) { 170 var url = get_balanced_urls('http://', wl_balancers, '.maps.wirelessleiden.nl/wlheatmap/tile/${z}/${x},${y}.png?colour=90,90,90');170 var url = get_balanced_urls('http://', {{ settings.DJANGO_CDN_DOMAINS|safe }}, '{{ settings.DJANGO_PREFIX }}/wlheatmap/tile/${z}/${x},${y}.png?colour=90,90,90'); 171 171 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 172 172 var newArguments = [name, url, options]; … … 182 182 OpenLayers.Layer.OSM.Overlay3 = OpenLayers.Class(OpenLayers.Layer.OSM, { 183 183 initialize: function(name, options) { 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');184 var url = get_balanced_urls('http://', {{ settings.DJANGO_CDN_DOMAINS|safe }}, '{{ settings.DJANGO_PREFIX }}/wlheatmap/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__ssid__icontains=WirelessLeiden'); 185 185 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 186 186 var newArguments = [name, url, options]; … … 196 196 OpenLayers.Layer.OSM.Overlay4 = OpenLayers.Class(OpenLayers.Layer.OSM, { 197 197 initialize: function(name, options) { 198 var url = get_balanced_urls('http://', wl_balancers, '.maps.wirelessleiden.nl/wlheatmap/tile/${z}/${x},${y}.png?colour=50,150,50&signaal__gte=0&signaal__lte=100');198 var url = get_balanced_urls('http://', {{ settings.DJANGO_CDN_DOMAINS|safe }}, '{{ settings.DJANGO_PREFIX }}/wlheatmap/tile/${z}/${x},${y}.png?colour=50,150,50&signaal__gte=0&signaal__lte=100'); 199 199 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options); 200 200 var newArguments = [name, url, options];
Note:
See TracChangeset
for help on using the changeset viewer.