Changeset 9578 for src/django_gheat/wlheatmap/static/heatmap_extensions.js
- Timestamp:
- Aug 26, 2011, 7:34:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/wlheatmap/static/heatmap_extensions.js
r9577 r9578 58 58 $("#sig_value").text("All AccessPoints Signal Strength: " + min + " - " + max); 59 59 $("#signallayer font").text("All AccessPoints Signal: " + min + " - " + max); 60 }; 61 62 function update_sig_slider(min,max) { 63 $("#select_sig_value").text("Signal Strength: " + min + " - " + max); 60 64 }; 61 65 … … 76 80 }, 77 81 }); 82 $("#select_sig_slider").slider({ 83 range: true, 84 min: 0, 85 max: 100, 86 values: [0,100], 87 // while sliding, it changes the text above the slider to show the values realtime 88 slide: function(event, sig){ 89 update_sig_slider(sig.values[0], sig.values[1]); 90 }, 91 }); 78 92 79 93 … … 84 98 signallayer[0].redraw(); 85 99 update_slider(min,max); 100 101 $("#select_sig_slider").slider( "option", "values", [min,max] ); 102 update_sig_slider(min,max); 86 103 }; 87 104 … … 323 340 324 341 // some checks if values are correct, and adding them to parts of the link 325 if (user != ''){user='&meetrondje__gebruiker__naam='+user;} 326 if (dataset != ''){dataset='&meetrondje__naam='+dataset;} 327 if (wlnode != ''){wlnode='&accespoint__ssid='+wlnode;} 342 if (user == 'all') { 343 user = ''; 344 } else { 345 user='&meetrondje__gebruiker__naam='+user; 346 } 347 if (dataset == 'all') { 348 dataset = ''; 349 } else { 350 dataset='&meetrondje__naam='+dataset; 351 } 352 if (wlnode == 'all'){ 353 wlnode=''; 354 } else { 355 wlnode='&accespoint__ssid='+wlnode; 356 } 328 357 if (start_date && end_date){ 329 358 sd_d=start_date.substr(0,2); … … 352 381 end_date='&meetrondje__datum__lte=' + ed_y +'-'+ ed_m +'-'+ ed_d; 353 382 } 354 if (colour != 'NaN,NaN,NaN'){colour=colour;} 355 else {colour = Math.floor(Math.random()*256)+','+Math.floor(Math.random()*256)+','+Math.floor(Math.random()*256);} 356 if (lname != ''){lname=lname;} 357 else {lname = 'Custom Filter';} 383 if (colour != 'NaN,NaN,NaN'){ 384 colour=colour; 385 } else { 386 colour = Math.floor(Math.random()*256)+','+Math.floor (Math.random()*256)+','+Math.floor(Math.random()*256); 387 } 388 if (lname == ''){ 389 lname= 'Custom Filter'; 390 } 391 392 var min = $("#select_sig_slider").slider("values")[0]; 393 var max = $("#select_sig_slider").slider("values")[1]; 394 signal = '&signaal__gte=' + min + '&signaal__lte=' + max; 358 395 359 396 // setting layer … … 361 398 initialize: function(name, options) { 362 399 var url = [ 363 "tile/${z}/${x},${y}.png? &colour=" + colour + user + dataset + wlnode + start_date + end_date400 "tile/${z}/${x},${y}.png?colour=" + colour + user + dataset + wlnode + start_date + end_date + signal 364 401 ]; 365 402 options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
Note:
See TracChangeset
for help on using the changeset viewer.