OpenLayers OpenLayers

Changeset 7401

Show
Ignore:
Timestamp:
06/20/08 18:04:03 (7 months ago)
Author:
edgemaster
Message:

Minor: Fix undeclared variables, move url property to the class definition.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/edgemaster/openlayers/lib/OpenLayers/Layer/OpenSpace.js

    r6888 r7401  
    99 */ 
    1010OpenLayers.Layer.OpenSpace = OpenLayers.Class(OpenLayers.Layer.WMS, { 
     11     
     12    /** 
     13     * Property: url 
     14     * {String} URL of OS tileserver API. 
     15     */ 
     16    url: "http://openspace.ordnancesurvey.co.uk/osmapapi/ts", 
     17     
    1118    /** 
    1219     * Constructor: OpenLayers.Layer.OpenSpace 
     
    2633        }, options); 
    2734         
    28         params = { 
     35        var params = { 
    2936            "KEY": apikey 
    3037        } 
    3138         
    32         url = "http://openspace.ordnancesurvey.co.uk/osmapapi/ts"; 
    33         var newArguments = [name, url, params, options]; 
     39        var newArguments = [name, this.url, params, options]; 
    3440        OpenLayers.Layer.WMS.prototype.initialize.apply(this, newArguments); 
    3541    }, 
     
    6167     */ 
    6268    initGriddedTiles: function(bounds) { 
     69        var tileSize; 
    6370        // The OS make it difficult for us, the highest resolution tiles are 
    6471        // served as 250x250px images, rather than the 200x200px as the rest. 
    6572        // OpenLayers.Layer.Grid calls this function if the zoom level changes 
    6673         
    67         res = this.map.getResolution(); 
     74        var res = this.map.getResolution(); 
    6875        if(res > 2) { 
    6976            tileSize = new OpenLayers.Size(200,200);