Changeset 9272 for src/django_gheat/website
- Timestamp:
- Jun 21, 2011, 12:25:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/website/static/heatmap_extensions.js
r9270 r9272 40 40 dateFormat: "dd/mm/yy", 41 41 }); 42 var testname = new Array(); 42 43 43 // add slider for signal strength filter 44 44 $("#slider").slider({ … … 73 73 }); 74 74 75 $("#filter_text").append("<a id=remove>test</a>"); 75 var testarray = new Array(); 76 $("#filter_text").append("<a id=remove>Get layers</a><br />"); 76 77 $("#remove").click(function(){ 77 map.removeLayer(signallayer); 78 testarray = map.getLayersByClass("OpenLayers.Layer.Overlay"); 79 $.each(testarray, function(v, value){ 80 $("#filter_text").append("<span id=\"" + value.name + "\"><input type=checkbox id=togglelayer />" + value.name + " <a style='color:#FF0000' id=rmvlayer name=\"" + value.name + "\">X</a><br /></span>"); 81 }); 82 }); 83 84 $("#togglelayer").live("click", function(){ 85 status = $(this).attr("checked"); 86 layername = $(this).parents('span').attr('id'); 87 layer = map.getLayersByName(layername); 88 layer[0].setVisibility(status); 89 }); 90 91 92 $("#rmvlayer").live("click", function(){ 93 $("#filter_text").append("<br />Removed " + this.name); 94 layer = map.getLayersByName(this.name); 95 console.log(rmvlayer); 96 map.removeLayer(layer[0]); 97 $(this).parents('span').remove(); 78 98 }); 79 99 … … 81 101 $("#menu_filter").click(function(){ 82 102 $("#filter").slideToggle("fast"); 83 $("#info").slideUp("fast"); 103 $("#info").slideUp("fast"); 84 104 }); 85 105 $("#menu_info").click(function(){
Note:
See TracChangeset
for help on using the changeset viewer.