Ignore:
Timestamp:
Jun 20, 2011, 3:14:40 PM (14 years ago)
Author:
dennisw
Message:

Filled in info page.
Experimented with getting filter names and showing and deleting filters. Right now, you can't delete your own custom filters (except the mass-add ones), but with this it might be possible to create a custom layer switcher where you can.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/website/static/heatmap_extensions.js

    r9269 r9270  
    4040    dateFormat: "dd/mm/yy",
    4141  });
    42 
     42  var testname = new Array();
    4343  // add slider for signal strength filter
    4444  $("#slider").slider({
     
    5959        initialize: function(name, options) {
    6060          var url = [
    61             "/website/tile/${z}/${x},${y}.png?colour=0,255,0&signaal__gte=" + sig.values[0] + "&signaal__lte=" + sig.values[1]
     61            "/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=" + sig.values[0] + "&signaal__lte=" + sig.values[1]
    6262          ];
    6363          options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
     
    6767      CLASS_NAME: "OpenLayers.Layer.Overlay"
    6868      });
    69       signallayer = new OpenLayers.Layer.OSM.Overlay("Signal strength: " + sig.values[0] + " - " + sig.values[1], {isBaseLayer: false, visibility: true});
     69      lname = "Signal strength: " + sig.values[0] + " - " + sig.values[1];
     70      signallayer = new OpenLayers.Layer.OSM.Overlay(lname, {isBaseLayer: false, visibility: true});
    7071      map.addLayer(signallayer);
    7172    },
     73  });
     74
     75  $("#filter_text").append("<a id=remove>test</a>");
     76  $("#remove").click(function(){
     77    map.removeLayer(signallayer);
    7278  });
    7379
Note: See TracChangeset for help on using the changeset viewer.