Ignore:
Timestamp:
Sep 3, 2011, 12:14:02 PM (13 years ago)
Author:
rick
Message:

Allow prefixing on domain proto to 'hack' a way making relative URLs by making
both CDN variables blank in local_settings.py.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/wlheatmap/templates/js/LayerBase.js

    r9648 r9653  
    5252     */
    5353    initialize: function(name, options) {
    54         var url = get_balanced_urls('http://', {{ settings.OSM_PROXY_CDN_DOMAINS|safe }}, '{{ settings.OSM_PREFIX }}/${z}/${x}/${y}.png');
     54        var url = get_balanced_urls('{{ settings.OSM_PROXY_CDN_DOMAINS_PROTOCOL }}', {{ settings.OSM_PROXY_CDN_DOMAINS|safe }}, '{{ settings.OSM_PREFIX }}/${z}/${x}/${y}.png');
    5555        options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options);
    5656        var newArguments = [name, url, options];
     
    166166OpenLayers.Layer.OSM.Overlay2 = OpenLayers.Class(OpenLayers.Layer.OSM, {
    167167    initialize: function(name, options) {
    168         var url = get_balanced_urls('http://', {{ settings.DJANGO_CDN_DOMAINS|safe }},
     168        var url = get_balanced_urls('{{ settings.DJANGO_CDN_DOMAINS_PROTOCOL }}' , {{ settings.DJANGO_CDN_DOMAINS|safe }},
    169169          '{{ settings.DJANGO_PREFIX }}/wlheatmap/tile/${z}/${x},${y}.png?colour=90,90,90');
    170170        options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
     
    181181OpenLayers.Layer.OSM.Overlay3 = OpenLayers.Class(OpenLayers.Layer.OSM, {
    182182    initialize: function(name, options) {
    183         var url = get_balanced_urls('http://', {{ settings.DJANGO_CDN_DOMAINS|safe }},
     183        var url = get_balanced_urls('{{ settings.DJANGO_CDN_DOMAINS_PROTOCOL }}', {{ settings.DJANGO_CDN_DOMAINS|safe }},
    184184          '{{ settings.DJANGO_PREFIX }}/wlheatmap/tile/${z}/${x},${y}.png?colour=255,0,0&accespoint__organization__name__startswith=Wireless');
    185185        options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
     
    196196OpenLayers.Layer.OSM.Overlay4 = OpenLayers.Class(OpenLayers.Layer.OSM, {
    197197  initialize: function(name, options) {
    198     var url = get_balanced_urls('http://', {{ settings.DJANGO_CDN_DOMAINS|safe }},
     198    var url = get_balanced_urls('{{ settings.DJANGO_CDN_DOMAINS_PROTOCOL }}', {{ settings.DJANGO_CDN_DOMAINS|safe }},
    199199      '{{ settings.DJANGO_PREFIX }}/wlheatmap/tile/${z}/${x},${y}.png?colour=50,150,50&signaal__gte=0&signaal__lte=100');
    200200    options = OpenLayers.Util.extend({ numZoomLevels: 21 }, options);
     
    205205  CLASS_NAME: "OpenLayers.Layer.Overlay"
    206206});
    207 
    208 var foo;
    209207
    210208// create the layer styleMap by giving the default style a context
Note: See TracChangeset for help on using the changeset viewer.