Changeset 9297 for src/django_gheat/website/static/heatmap_extensions.js
- Timestamp:
- Jun 24, 2011, 1:21:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/static/heatmap_extensions.js
r9276 r9297 52 52 $("#signallayer font").text("Signal strength: " + sig.values[0] + " - " + sig.values[1]); 53 53 }, 54 // on slider stop, it tries to delete the old layer and creates a new layer with the slider values54 // on slider stop, it sets a new URL with updated values and redraws the layer 55 55 stop: function(event, sig){ 56 56 signallayer = map.getLayersByName('signallayer'); … … 62 62 63 63 // toggle layer visibility 64 $("#togglelayer").live( "click", function(){64 $("#togglelayer").live('click', function(){ 65 65 status = $(this).attr("checked"); 66 66 layername = $(this).parents('span').attr('id'); … … 69 69 }); 70 70 71 // toggle layer visibility per categorie 72 $("#togglecat").click(function(){ 73 layertype = $(this).closest('div').attr('id'); 74 75 71 // toggle layer visibility per category 72 $("#togglecat").live("click", function(){ 73 if($(this).attr("checked")){ 74 status = true; 75 } 76 else{ 77 status = false; 78 } 79 layertype = $(this).attr('class'); 80 layers = new Array(); 81 layers = $('#' + layertype).children('span'); 82 $.each(layers, function(l, layer){ 83 layer = map.getLayersByName(layer.id); 84 layer[0].setVisibility(status); 85 $(this).children('input').attr('checked', status); 86 }); 76 87 }); 77 88
Note:
See TracChangeset
for help on using the changeset viewer.