Ignore:
Timestamp:
Jun 16, 2011, 5:02:02 PM (14 years ago)
Author:
dennisw
Message:

After adding a mass-node or user filter, you can now delete them too.

File:
1 edited

Legend:

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

    r9263 r9264  
    22function init(){
    33
    4         var projection_wgs = new OpenLayers.Projection("EPSG:4326"); // WGS 1984
     4  var lat   = 52.14068;
     5  var lon   = 4.48319;
     6  var zoom  = 16;
     7  var projection_wgs = new OpenLayers.Projection("EPSG:4326"); // WGS 1984
    58
    6         map = new OpenLayers.Map('heatmap', {
    7                 controls: [
    8                                 new OpenLayers.Control.Navigation(),
    9                                 //new OpenLayers.Control.PanZoomBar(),
    10                                 //new OpenLayers.Control.ScaleLine(),
    11                                 new OpenLayers.Control.Permalink(),
    12                                 new OpenLayers.Control.LayerSwitcher(),
    13                                 new OpenLayers.Control.MousePosition({ 'displayProjection' : projection_wgs }),
    14                 ],
    15                 maxExtent: new OpenLayers.Bounds(-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892),
    16                 numZoomLevels:16,
    17                 maxResolution:156543.0339,
    18                 units:'m',
    19                 projection: "EPSG:900913",
    20                 displayProjection: new OpenLayers.Projection("EPSG:4326")
    21         });
     9  map = new OpenLayers.Map('heatmap', {
     10    controls: [
     11      new OpenLayers.Control.Navigation(),
     12      //new OpenLayers.Control.PanZoomBar(),
     13      //new OpenLayers.Control.ScaleLine(),
     14      new OpenLayers.Control.Permalink(),
     15      new OpenLayers.Control.LayerSwitcher(),
     16      new OpenLayers.Control.MousePosition({ 'displayProjection' : projection_wgs }),
     17    ],
     18    maxExtent: new OpenLayers.Bounds(-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892),
     19    numZoomLevels:16,
     20    maxResolution:156543.0339,
     21    units:'m',
     22    projection: "EPSG:900913",
     23    displayProjection: new OpenLayers.Projection("EPSG:4326")
     24  });
    2225
    23         map.events.register('click', map, GetMousePos);
    24         function GetMousePos(pos) {
    25                 var pix = map.getLonLatFromPixel(new OpenLayers.Pixel(pos.xy.x,pos.xy.y));
    26                 var mousepos = OpenLayers.Layer.SphericalMercator.inverseMercator(pix.lon, pix.lat);
    27                 var zoomlevel = map.getZoom();
    28                 getNodeList(zoom, mousepos);
    29         }
     26  map.events.register('click', map, GetMousePos);
     27  function GetMousePos(pos) {
     28    var pix = map.getLonLatFromPixel(new OpenLayers.Pixel(pos.xy.x,pos.xy.y));
     29    var mousepos = OpenLayers.Layer.SphericalMercator.inverseMercator(pix.lon, pix.lat);
     30    var zoomlevel = map.getZoom();
     31    getNodeList(zoom, mousepos);
     32  }
    3033
    31         layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
    32         map.addLayer(layerMapnik);
     34  layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
     35  map.addLayer(layerMapnik);
    3336
    34         layerHeatmap2 = new OpenLayers.Layer.OSM.Overlay2("All Access points", {isBaseLayer: false, visibility: true});
    35         map.addLayer(layerHeatmap2);
     37  layerHeatmap2 = new OpenLayers.Layer.OSM.Overlay2("All Access points", {isBaseLayer: false, visibility: true});
     38  map.addLayer(layerHeatmap2);
    3639
    37         layerHeatmap3 = new OpenLayers.Layer.OSM.Overlay3("Wireless Leiden Only", {isBaseLayer: false, visibility: true});
    38         map.addLayer(layerHeatmap3);
     40  layerHeatmap3 = new OpenLayers.Layer.OSM.Overlay3("Wireless Leiden Only", {isBaseLayer: false, visibility: true});
     41  map.addLayer(layerHeatmap3);
    3942
    40         layerHeatmap = new OpenLayers.Layer.OSM.Overlay1("Original Heatmap generator", {isBaseLayer: false, visibility: false});
    41         map.addLayer(layerHeatmap);
     43  layerHeatmap = new OpenLayers.Layer.OSM.Overlay1("Original Heatmap generator", {isBaseLayer: false, visibility: false});
     44  map.addLayer(layerHeatmap);
    4245       
    43         var lon   = 4.48319;
    44         var lat   = 52.14068;
    45         var zoom  = 16;
    46 
    47         var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
    48         map.setCenter (lonLat, zoom);
     46  var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
     47  map.setCenter (lonLat, zoom);
    4948}
Note: See TracChangeset for help on using the changeset viewer.