OpenLayers OpenLayers

Ticket #881: remove_reproject.patch

File remove_reproject.patch, 5.5 kB (added by crschmidt, 1 year ago)

deprecate reproject, and remove from classes where it was never needed

  • tests/Tile/test_Image.html

    old new  
    168168        var size = new OpenLayers.Size(5,6); 
    169169        var map = new OpenLayers.Map('map'); 
    170170        var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",  
    171             "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});  
     171            "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, {'reproject': true});  
    172172        map.addLayer(layer); 
    173173        map.zoomToMaxExtent(); 
    174174        tile = new OpenLayers.Tile.Image(layer, position, new OpenLayers.Bounds(-90,-85,-90,85), url, size); 
     
    176176        tile.moveTo(new OpenLayers.Bounds(-185,-90,-180,-80), new OpenLayers.Pixel(-180,-85), true); 
    177177        t.delay_call( 1, function() { t.eq(tile.imgDiv, null, "Tile imgDiv is null.") } ); 
    178178        var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",  
    179             "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, {'alpha':true}); 
     179            "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}, {'reproject': true, 'alpha':true}); 
    180180        map.addLayer(layer); 
    181181        tile = new OpenLayers.Tile.Image(layer, position, new OpenLayers.Bounds(-90,-85,-90,85), url, size); 
    182182        tile.draw(); 
  • tests/Layer/test_WMS.html

    old new  
    282282            var layer = new OpenLayers.Layer.Google("Google"); 
    283283            map.addLayer(layer); 
    284284            var wmslayer = new OpenLayers.Layer.WMS(name, url, params, 
    285                                                     {isBaseLayer: false}); 
     285                                                    {isBaseLayer: false, reproject:true}); 
    286286            wmslayer.isBaseLayer=false; 
    287287            map.addLayer(wmslayer); 
    288288            map.setCenter(new OpenLayers.LonLat(0,0), 5); 
  • lib/OpenLayers/Tile.js

    old new  
    205205     * bounds - {<OpenLayers.Bounds>}  
    206206     */ 
    207207    getBoundsFromBaseLayer: function(position) { 
     208        OpenLayers.Console.warn("You are using the 'reproject' option " + 
     209          "on the " + this.layer.name + " layer. This option is deprecated: " + 
     210          "its use was designed to support displaying data over commercial " +  
     211          "basemaps, but that functionality should now be achieved by using " + 
     212          "Spherical Mercator support. More information is available from " + 
     213          "http://trac.openlayers.org/wiki/SphericalMercator.");  
    208214        var topLeft = this.layer.map.getLonLatFromLayerPx(position);  
    209215        var bottomRightPx = position.clone(); 
    210216        bottomRightPx.x += this.size.w; 
  • lib/OpenLayers/Layer/WMS.js

    old new  
    3131     
    3232    /** 
    3333     * Property: reproject 
     34     * *Deprecated*. See http://trac.openlayers.org/wiki/SpatialMercator 
     35     * for information on the replacement for this functionality.  
    3436     * {Boolean} Try to reproject this layer if its coordinate reference system 
    3537     *           is different than that of the base layer.  Default is true.   
    3638     *           Set this in the layer options.  Should be set to false in  
    3739     *           most cases. 
    3840     */ 
    39     reproject: true, 
     41    reproject: false, 
    4042  
    4143    /** 
    4244     * APIProperty: isBaseLayer 
  • lib/OpenLayers/Layer/TileCache.js

    old new  
    1717OpenLayers.Layer.TileCache = OpenLayers.Class(OpenLayers.Layer.Grid, { 
    1818 
    1919    /**  
    20      * APIProperty: reproject 
    21      * {Boolean} Try to reproject this layer if it is used as an overlay. 
    22      *     Default is false. 
    23      **/ 
    24     reproject: false, 
    25      
    26     /**  
    2720     * APIProperty: isBaseLayer 
    2821     * {Boolean} Treat this layer as a base layer.  Default is true. 
    2922     **/ 
  • lib/OpenLayers/Layer/HTTPRequest.js

    old new  
    3535     
    3636    /**  
    3737     * APIProperty: reproject 
     38     * *Deprecated*. See http://trac.openlayers.org/wiki/SpatialMercator 
     39     * for information on the replacement for this functionality.  
    3840     * {Boolean} Whether layer should reproject itself based on base layer  
    3941     *           locations. This allows reprojection onto commercial layers.  
    4042     *           Default is false: Most layers can't reproject, but layers  
    41      *           which can create non-square geographic pixels can, like WMS.  
     43     *           which can create non-square geographic pixels can, like WMS. 
     44     *            
    4245     */ 
    4346    reproject: false, 
    4447 
  • lib/OpenLayers/Layer/TMS.js

    old new  
    1414OpenLayers.Layer.TMS = OpenLayers.Class(OpenLayers.Layer.Grid, { 
    1515 
    1616    /** 
    17      * APIProperty: reproject 
    18      * {Boolean} 
    19      */ 
    20     reproject: false, 
    21  
    22     /** 
    2317     * APIProperty: isBaseLayer 
    2418     * {Boolean} 
    2519     */