Ignore:
Timestamp:
May 8, 2011, 8:59:15 PM (14 years ago)
Author:
rick
Message:

Some nice hacks to do filtered dynamic views and alternating colours if needed.

Location:
src/django_gheat/website/static
Files:
2 edited

Legend:

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

    r9147 r9166  
    158158    initialize: function(name, options) {
    159159        var url = [
    160             "/website/tile/${z}/${x},${y}.png"
     160            "/website/tile/${z}/${x},${y}.png?colour=255,0,0"
    161161        ];
    162162        options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
     
    167167    CLASS_NAME: "OpenLayers.Layer.Overlay2"
    168168});
     169
     170OpenLayers.Layer.OSM.Overlay3 = OpenLayers.Class(OpenLayers.Layer.OSM, {
     171    initialize: function(name, options) {
     172        var url = [
     173            "/website/tile/${z}/${x},${y}.png?colour=0,0,255&accespoint__ssid__icontains=WirelessLeiden"
     174        ];
     175        options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
     176        var newArguments = [name, url, options];
     177        OpenLayers.Layer.OSM.prototype.initialize.apply(this, newArguments);
     178    },
     179
     180    CLASS_NAME: "OpenLayers.Layer.Overlay3"
     181});
  • src/django_gheat/website/static/heatmap.js

    r9147 r9166  
    2424        map.addLayer(layerHeatmap);
    2525
    26         layerHeatmap2 = new OpenLayers.Layer.OSM.Overlay2("Overlay 2", {isBaseLayer: false, visibility: false});
     26        layerHeatmap2 = new OpenLayers.Layer.OSM.Overlay2("All Access points", {isBaseLayer: false, visibility: false});
    2727        map.addLayer(layerHeatmap2);
     28
     29        layerHeatmap3 = new OpenLayers.Layer.OSM.Overlay3("Wireless Leiden Only", {isBaseLayer: false, visibility: true});
     30        map.addLayer(layerHeatmap3);
    2831       
    2932        var lon   = 4.48907;
Note: See TracChangeset for help on using the changeset viewer.