Ignore:
Timestamp:
Jun 30, 2011, 3:26:19 PM (13 years ago)
Author:
dennisw
Message:

Set Leiden as center of map.
Layerswitcher categories can be toggled now. Small changes to css.

File:
1 edited

Legend:

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

    r9302 r9316  
    6868    stop: function(event, sig){
    6969      signallayer = map.getLayersByName('signallayer');
    70       console.log(signallayer[0]);
    7170      signallayer[0].setUrl("/website/tile/${z}/${x},${y}.png?colour=250,250,0&signaal__gte=" + sig.values[0] + "&signaal__lte=" + sig.values[1]);
    7271      signallayer[0].redraw();
     
    144143
    145144  /**
     145   * Toggles layerswitcher visibility.
     146   * On 'off', toggler shows a '+'.
     147   * On 'on', toggler shows a '-'.
     148   */
     149  $("#cat_hide").live("click", function(){
     150    cat = $(this).parent('div').next('p').children('span')
     151    cat.toggle();
     152    if(cat.is(":visible")){
     153      //FIXME: images are getting loaded the hard way. Replace '/static/'. '{{ STATIC_URL }}' doesn't seem to work here.
     154      $(this).css('background-image', "url(/static/img/up.png)");
     155    }
     156    else{
     157      $(this).css('background-image', "url(/static/img/down.png)");
     158    }
     159  });
     160
     161  /**
    146162   * Fastest?
    147163   * http://stackoverflow.com/questions/170986/what-is-the-best-way-to-add-options-to-a-select-from-an-array-with-jquery
     
    153169        userlist.push(json.gebruiker);
    154170        $.each(json.meetrondje, function(m, meetrondje){
    155           console.log(meetrondje.datum);
    156171          $("#select_dataset").append($("<option/>").attr({"class":json.gebruiker, "value":meetrondje.naam}).text(meetrondje.naam));
    157172          $.each(meetrondje.nodes, function(n, nodes){
Note: See TracChangeset for help on using the changeset viewer.