OpenLayers OpenLayers

Changeset 3768

Show
Ignore:
Timestamp:
07/16/07 18:08:28 (1 year ago)
Author:
euzuro
Message:

fix for #843 - remove unnecesary url prepping in image tiles

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Layer/Image.js

    r3767 r3768  
    160160                //create the new tile 
    161161                this.tile = new OpenLayers.Tile.Image(this, ulPx, this.extent,  
    162                                                       this.url, this.tileSize); 
     162                                                      null, this.tileSize); 
    163163            } else { 
    164164                //just resize the tile and set it's new position 
  • trunk/openlayers/lib/OpenLayers/Layer/MapServer.js

    r3767 r3768  
    8989     */ 
    9090    addTile:function(bounds,position) { 
    91         var url = this.getURL(bounds); 
    92         return new OpenLayers.Tile.Image(this, position, bounds, url, this.tileSize); 
     91        return new OpenLayers.Tile.Image(this, position, bounds,  
     92                                         null, this.tileSize); 
    9393    }, 
    9494     
  • trunk/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js

    r3767 r3768  
    182182            this.setTileSize(); 
    183183 
    184             //formulate request url string 
    185             var url = this.getURL(tileBounds);  
    186  
    187184            //determine new position (upper left corner of new bounds) 
    188185            var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); 
     
    198195            if (!this.tile) { 
    199196                this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds,  
    200                                                      url, this.tileSize); 
     197                                                      null, this.tileSize); 
    201198                this.tile.draw(); 
    202199                var onload = function() {  
  • trunk/openlayers/lib/OpenLayers/Layer/TMS.js

    r3767 r3768  
    117117     */ 
    118118    addTile:function(bounds,position) { 
    119         var url = this.getURL(bounds); 
    120119        return new OpenLayers.Tile.Image(this, position, bounds,  
    121                                              url, this.tileSize); 
     120                                         null, this.tileSize); 
    122121    }, 
    123122 
  • trunk/openlayers/lib/OpenLayers/Layer/WMS.js

    r3767 r3768  
    163163     */ 
    164164    addTile:function(bounds,position) { 
    165         var url = this.getURL(bounds); 
    166165        return new OpenLayers.Tile.Image(this, position, bounds,  
    167                                              url, this.tileSize); 
     166                                         null, this.tileSize); 
    168167    }, 
    169168 
  • trunk/openlayers/lib/OpenLayers/Layer/WorldWind.js

    r3767 r3768  
    6565     */ 
    6666    addTile:function(bounds,position) { 
    67         if (this.map.getResolution() <= (this.lzd/512) 
    68             && this.getZoom() <= this.zoomLevels) { 
    69             var url = this.getURL(bounds); 
    70             return new OpenLayers.Tile.Image(this, position, bounds,  
    71                                              url, this.tileSize); 
    72         } else { 
    73             return new OpenLayers.Tile.Image(this, position, bounds,  
    74                        OpenLayers.Util.getImagesLocation() + "blank.gif",  
    75                        this.tileSize); 
    76         } 
     67        return new OpenLayers.Tile.Image(this, position, bounds,  
     68                                             null, this.tileSize); 
    7769    }, 
    7870 
  • trunk/openlayers/lib/OpenLayers/Tile/Image.js

    r3767 r3768  
    3737    frame: null,  
    3838 
    39     /** TBD 3.0 - reorder the parameters to the init function to put URL  
    40      *             as last, so we can continue to call tile.initialize()  
    41      *             without changing the arguments.  
     39    /** TBD 3.0 - reorder the parameters to the init function to remove  
     40     *             URL. the getUrl() function on the layer gets called on  
     41     *             each draw() and moveTo(), so no need to specify it here. 
    4242     *  
    4343     * Constructor: OpenLayers.Tile.Image 
     
    4848     * position - {<OpenLayers.Pixel>} 
    4949     * bounds - {<OpenLayers.Bounds>} 
    50      * url - {<String>} 
     50     * url - {<String>} Deprecated. Remove me in 3.0. 
    5151     * size - {<OpenLayers.Size>} 
    5252     */    
     
    5454        OpenLayers.Tile.prototype.initialize.apply(this, arguments); 
    5555 
    56         this.url = url; 
    57  
     56        this.url = url; //deprecated remove me 
     57         
    5858        this.frame = document.createElement('div');  
    5959        this.frame.style.overflow = 'hidden';  
  • trunk/openlayers/tests/Layer/test_MapServer.html

    r2979 r3768  
    125125 
    126126    function test_06_Layer_MapServer_mergeNewParams (t) { 
    127         t.plan( 5 ); 
     127        t.plan( 4 ); 
    128128 
    129129        var map = new OpenLayers.Map("map"); 
     
    136136        map.addLayer(layer); 
    137137        map.zoomToMaxExtent(); 
    138         t.ok( !layer.grid[0][0].url.match("chickpeas"), "chickpeas is not in URL of first tile in grid" ); 
    139  
     138         
    140139        layer.mergeNewParams(newParams); 
    141140         
  • trunk/openlayers/tests/Layer/test_WMS.html

    r3554 r3768  
    149149 
    150150    function test_06_Layer_WMS_mergeNewParams (t) { 
    151         t.plan( 5 ); 
     151        t.plan( 4 ); 
    152152 
    153153        var map = new OpenLayers.Map("map"); 
     
    160160        map.addLayer(layer); 
    161161        map.zoomToMaxExtent(); 
    162         t.ok( !layer.grid[0][0].url.match("CHICKPEAS"), "CHICKPEAS is not in URL of first tile in grid" ); 
    163162 
    164163        layer.mergeNewParams(newParams);